plouc / nivo

nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
https://nivo.rocks
MIT License
13.08k stars 1.02k forks source link

window is not defined, when using @nivo/pie in Next.JS #1253

Closed Ry-DS closed 3 years ago

Ry-DS commented 3 years ago

Describe/explain the bug It doesn't seem like the pie chart @nivo/pie supports server side rendering. Others however such as line do.

To Reproduce

  1. Create a new next app yarn create next-app
  2. Add pie charts yarn add @nivo/pie
  3. Go inside pages and edit the index.js to import Pie and try using it with <Pie/>

Expected behavior The Pie chart renders server side and all is good.

Screenshots image image

Desktop (please complete the following information):

Thank you!

plouc commented 3 years ago

@SimplyBallistic, sorry for this, it has been fixed in https://github.com/plouc/nivo/pull/1250 and should be available in the next release.

Ry-DS commented 3 years ago

no worries, thanks for the quick reply :)

gomorizsolt commented 3 years ago

I'm facing with the same issue. As per the releases, #1250 hasn't been made available. When do you plan the next release?

plouc commented 3 years ago

@gomorizsolt, I'm gonna try to release tomorrow.

gomorizsolt commented 3 years ago

Thanks!