Home forums Using CanvasJS Performance Impact

This topic contains 1 reply, has 2 voices, and was last updated by  Indranil Deo 6 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #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

    Indranil Deo
    Member

    @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.