okelly
Posts: 3
Joined: Wed Sep 06, 2023 1:32 pm

Multiple y axes not staying aligned

Wed Sep 06, 2023 1:36 pm

Hi there,

I have some data that updates every day, where one series exists between 0 and 75, and the other series exists between -15 to 4. I want to try and show multiple y axes on the chart for the different series, but whenever I do this, the primary y-axis starts at -18, and the secondary y-axis starts at 0.

Is there a way to get these axes to align (and stay aligned as new data comes in), such that 0 on the primary axis is at the same level as 0 on the secondary axis?

jakub.j
Posts: 857
Joined: Tue Jan 24, 2023 11:14 am

Re: Multiple y axes not staying aligned

Wed Sep 06, 2023 2:30 pm

Welcome to our forum and thanks for contacting us with your question!

You need to have the same min and max on both axis to align the 0 value level, see:

Demo: https://jsfiddle.net/BlackLabel/pufye3zs/

Let me know if you have any further questions!
Kind regards
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Stock”