reactjs / react-chartjs

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

Can I update chart instead of destroy on componentWillReceiveProps? #7

Closed jefffriesen closed 9 years ago

jefffriesen commented 9 years ago

I would like to .update() the chart when data changes. Right now, passing data into the chart component triggers a .destroy() and initializeChart(), which completely redraws the chart instead of transitioning the data from one point to another.

I see update, addData and others in the extras, but I couldn't figure out how to call those when new props were passed in.

jhudson8 commented 9 years ago

Honestly, that area probably needs a little more thought. I welcome pull requests

jefffriesen commented 9 years ago

PR submitted: https://github.com/jhudson8/react-chartjs/pull/8

jefffriesen commented 9 years ago

addressed by https://github.com/jhudson8/react-chartjs/pull/8