reactjs / react-chartjs

common react charting components using chart.js
MIT License
2.93k stars 301 forks source link

Adding a legend? #63

Closed djkashtan closed 8 years ago

djkashtan commented 8 years ago

Can you update the examples with a legend for at least one of them? I am stumped and I found one example on google but I could not get it to work...

The one example that I did find was this one: https://github.com/jhudson8/react-chartjs/issues/19 but I could not get the line: "var legend = this.refs.chart.getChart().generateLegend();" to work, getChart was undefined :(

djkashtan commented 8 years ago

Huh, so if I follow the example from resolved issue #19 better I can get it to work, but I just get white dots for the legend. At this point maybe it is just a chartjs problem. Please delete this issue or mark it as resolved.