Home › forums › Using CanvasJS › Performance Impact
This topic contains 1 reply, has 2 voices, and was last updated by Indranil Deo 1 month ago.
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();
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
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.
You must be logged in to reply to this topic.