@tannerlinsley @fulldecent
I believe the change merged in #856 actually breaks compatibility with the currently documented method of updating your chart dynamically. In short, if you update the chart data at chart.datasets[i].points[j].value, as currently documented, but do not change the data object passed to the chart constructor, your modifications get reset when you call chart.update().
Here are two JS Bin examples that show the issue, using code that is almost entirely copied and pasted from the docs.
- Using v1.0.2, one data point updates every second as expected: JS Bin
- Using the latest code, calling
chart.update() overwrites the change made to myLineChart.datasets[0].points[2].value: JS Bin
IMO what #856 is intending to do is a worthwhile usability improvement, but it should be implemented in a way that does not impact existing usage.
@tannerlinsley @fulldecent
I believe the change merged in #856 actually breaks compatibility with the currently documented method of updating your chart dynamically. In short, if you update the chart data at
chart.datasets[i].points[j].value, as currently documented, but do not change the data object passed to the chart constructor, your modifications get reset when you callchart.update().Here are two JS Bin examples that show the issue, using code that is almost entirely copied and pasted from the docs.
chart.update()overwrites the change made tomyLineChart.datasets[0].points[2].value: JS BinIMO what #856 is intending to do is a worthwhile usability improvement, but it should be implemented in a way that does not impact existing usage.