Home Forums Chart Support memory leak

memory leak

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

    Hi,

    I have a built a tool where the charts are constantly changing depending on several inputs.
    Currently I’m creating a new chart each time, but this results in memory leaks

    http://jsfiddle.net/dreamfalcon/Lf3h5/#base

    What I’m doing wrong?

    Br,
    Daniel Silva

    #6285

    Daniel,

    You are creating a totally new chart each time you want to update which is causing memory leak. Instead create the chart once and only update the data inside “updateChartN” method. Please check this example.


    Sunil Urs

    #6291

    Ok, I will try that.

    What is consuming memory, the chart objects or something about the canvas?

    Br,
    Daniel

    #6292

    Tried a different approach, works great :)

    if(charts[key]==undefined){
       //create chart....
       charts[key]=chart;		
    }else{
       chart = charts[key];
       chart.options.data[0].dataPoints=points;
    }				
    chart.render();
    • This reply was modified 10 years, 6 months ago by Daniel Silva.
    • This reply was modified 10 years, 6 months ago by Daniel Silva.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.