When we update data, the point elements are animated vertically from their old data value to their new one. When the updated data is a horizontal translation of the previous (such as a sliding window of realtime data), this causes large and confusing changes in the graph during the animation.
We should add the option to specify the data is a translation and match point elements to their translated values.
{
labels: [0, 1, 2, 3, 4, 5],
data: [200, 100, 800, 900, 100, 5]
}
We can update the data, specifying that it is a translation of the previous data.
chart.setData([100, 800, 900, 100, 99], { translation: -1 })
This will probably be difficult to implement given the current codebase, but it's necessary if we want to support real-time data.