Home Forums Chart Support Dynamic chart w shifting array

Dynamic chart w shifting array

Viewing 4 posts - 1 through 4 (of 4 total)
  • #24989

    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/

    #24999

    @cmac,

    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.

    ___________
    Indranil Deo,
    Team CanvasJS

    #28303

    In updated code plot is not shifting….

    #28333

    @el-berto,

    uncommenting the line //dataPoints.shift(); in the above example will trigger the shift operation for dataPoints.

    ___________
    Indranil Deo
    Team CanvasJS

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.