what is the best way to set the axis.setCompare ? basically we are trying to draw seasonality chart. and when user clicks on that chart type..
we set chart.yAxis[0].setCompare('percent');
everything is working fine at this point.. and chart shows in percent mode..
but then user clicks on 'reset' to go back to original mode.. thats when i do
chart.yAxis[0].setCompare(null) --> but this is giving me below exception
highstock.src.js:50663 Uncaught TypeError: Cannot read properties of undefined (reading 'forEach')
at LineSeries.seriesSetCompare [as setCompare] (highstock.src.js:50663:33)
at highstock.src.js:50541:36
at Array.forEach (<anonymous>)
at Axis.setModifier (highstock.src.js:50538:33)
at Axis.axisSetCompare [as setCompare] (highstock.src.js:50724:22)
and if i use
chart.get('series').update({compare:null});
this does not give me any exception.. but then y-Axis range starts from zero and max from original.. it seems that its setting dataMIn to be 0..
is there a way to fix this situation..
i have complicated code and couple of series for sure.. so it would be really hard to re-create this on simple demo...
but i am just looking for some pointer just to reset the dataMin or somehow to avoid that exception..