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

Is it possible to render legends in Nivo SSR api? #1516

Closed kkcy closed 3 years ago

kkcy commented 3 years ago

Thanks for the great chart library!

I've been using Nivo API to generate charts to PDF via puppeteer, but adding legends doesn't seem to work. Are legends supported under Nivo API?

plouc commented 3 years ago

Legends should work with puppeteer as I guess you're taking screenshots of the charts, if you have a look at the screenshots generated for each package README (also using puppeteer), you can see that legends are there, for example https://github.com/plouc/nivo/blob/master/packages/bar/doc/bar.png.

wyze commented 3 years ago

Going to close this as plouc already answered the question and we are doing it in the project when adding a new chart as well.