Home Forums Chart Support Performance Impact

Performance Impact

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

    Hi,
    I want to know if there will be any performance issues if I render the chart with new CanvasJS.Chart() instead of calling the render method of the chart instance.

    For example, if I have created a chart c = new CanvasJS.Chart();

    Senario 1 :
    I do some changes with c.chart.options….
    and then c.render();

    vs

    Senario 2 :
    Instead of making changes in c.chart.options, I do
    c = new CanvasJS.Chart() with new options every time I want to update the chart

    #20448

    @himanshu_tanwar,

    Scenario 1 would not cause any performance issue. But in Scenario 2 as the chart is getting recreated every time it may cause performance lag due to the browser memory management. Also please refer this blog-post on tips to improve performance.

    ___________
    Indranil Deo,
    Team CanvasJS

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

You must be logged in to reply to this topic.