Home forums Using CanvasJS Striplines performance Reply To: Striplines performance


Bivek Singh


You can disable the rendering of chart each time a stripline is added by setting the fourth parameter to false in addTo method. It is taking long time to render since you’re rendering the chart each time a stripline is added as the fourth parameter is set to true by default. You will still need to render the chart once you are done with adding all the striplines.

$.each(data, function(key, value){
    chart.axisX[0].addTo("stripLines", {value: value, lineDashType: "dot"}, 0, false);

Please update the changes in your code and it should work fine.
Bivek Singh,
Team CanvasJS