Home › forums › Using CanvasJS › Dynamic chart w shifting array
This topic contains 1 reply, has 2 voices, and was last updated by Indranil Deo 6 months, 2 weeks ago.
Evaluating a purchase of this library but finding an issue with our initial testing on a live chart showing a fixed number of dataPoints. More specifically: we need to display the last X values, shifting the first value off the array and pushing a new value onto the end.
We first looked at this a couple months ago and this seemed to be how the examples on the Canvasjs were constructed. Now that we’ve had problems I’m looking at those examples on the site again and can see the lines containing the shift operations are commented out. Is there a known issue with this?
Example (line 34): https://canvasjs.com/jquery-charts/dynamic-chart/
Thanks for bringing it to our notice, we have updated the example. Please take a look at the updated code. Shifting should work fine with the updated code.
You must be logged in to reply to this topic.