Home Forums Chart Support Data stops updating (for apparently no reason)

Data stops updating (for apparently no reason)

Viewing 3 posts - 1 through 3 (of 3 total)
  • #19727

    Hi, I’m using the area chart, and I’m having problem with updating the chart.

    The data that feeds the chart can be changed by the user, so the chart should update according to user’s input. It all works fine until one specific function “clearThis()” is called. This function replaces the points inside the array holding the data (called ‘load1’) by [{x:0, y:0}], erasing the previous data. After that, it seems like the chart loses its capacity to read the data array (load1), and the chart stops updating. I don’t see why, and I can’t find the error.

    My code in under this folder

    I appreciate any help!



    Within clearThis(), you are trying to assign dataPoints to dataSeries. Updating it properly should work fine in this case i.e. Replacing chart1.data = load1; with chart1.options.data[0].dataPoints = load1; should work fine. Here is the working code of the same.

    Vishwas R
    Team CanvasJS


    I missed that! thank you very much!! you guys are the best <3

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

You must be logged in to reply to this topic.