Posts: 4
Joined: Tue Jul 25, 2023 1:12 pm

StockChart AddSeries problem

Wed Sep 06, 2023 9:55 am


I want to add series dynamic with this code above;

let options = {
type: 'line',
id: symbol,
name: symbol,
data: data,
yAxis: 0,

After adding new series I make comparison type percentage like this;

chart.series.forEach((series) => {

if (compare == "value") {
min = Math.min(parseFloat(series.yData));
min: min,
dataMin: min,
compare: compare
}, false);
chart.yAxis[0].update({ min: min,dataMin:min });

Then i remove single serie. But after i remove a serie from chart ,yAxis still starts at "0".
For example my value array min data is = 5.75 but yAxis is still at "0". how can i solve this problem?


Posts: 519
Joined: Tue Jan 24, 2023 11:21 am

Re: StockChart AddSeries problem

Wed Sep 06, 2023 2:32 pm


Thanks for reaching out to us with your question!

This behaviour stems from the fact that yAxis.startOnTick defaultly set to true on Highstock charts. If you set it to false, the y-axis min should stay the same, even after removing the series.



Let me know if that was what you were looking for!
Best regards!
Jędrzej Ruta
Highcharts Developer

Return to “Highcharts Stock”