Home forums Using CanvasJS Incorrect label displayed for quarter of the year Reply To: Incorrect label displayed for quarter of the year

#19208

Ravneet03
Member

Hi,
I am using older version of CanvasJS which does not support addTo() method result being the old values are replaced in stripLines everytime I update it. As a result there is only one stripLine visible at the execution of code.
I am adding stripLines like below
chart.options.axisX.stripLines = [{...}];

From what it looks like striplines are an array, so when I try update it like below.
chart.options.axisX.stripLines[j] = [{...}]
where value of j is incremented using for loop, I get an error. Uncaught TypeError: Cannot read property '0' of undefined

Please suggest an alternative of addTo method I can use.

Thanks,
Ravneet