Home Forums Chart Support Clearing data source – dataPoints = []; – locks graph

Clearing data source – dataPoints = []; – locks graph

Viewing 2 posts - 1 through 2 (of 2 total)
  • #32964

    Hi,

    Why does setting the data source array, like “dataPoints = [];”, after the graph has rendered the initial data, correctly, lock the graph..? I can refill the array and say “graph.render();” and the graph does nothing.

    In our application I need to dynamically change the sample size and then have the graph render the entire new sample as a discrete set of elements.

    Thank you,
    Chris

    #32972

    @isquared,

    You can update all chart elements including data and chart options dynamically by changing chart.options and calling chart.render. Please check this documentation page for tutorial and live examples on updating chart options.

    If you are still facing issue, kindly create a JSFiddle reproducing the issue you are facing and share it with us so that we can look into the code / chart-options being used, understand the scenario better and help you resolve it.

    updating chart options

    ___________
    Indranil Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.