veronikauly
Posts: 7
Joined: Tue Jun 21, 2022 9:59 am

Match between Y extremes scale between regular and navigator series

Hello
I created a Highcharts.stockChart chart of type: spline with navigator and range selector.
The problem is when my chart series are really flat (differences between y values are very small) - in navigator series it looks like there is a large difference between values and it does not match the reality


Code: Select all

scrollbar: {
 enabled: true
 },
rangeSelector:   {
       enabled: true,
       inputEnabled: false,
       labelStyle: {
           display: 'none'
      },
      allButtonsEnabled: false,
      buttons: [],
             },
navigator:  {
    enabled:true,
    maskInside: false,
    maskFill: 'rgba(217, 217, 217, 0.4)'
}

hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Match between Y extremes scale between regular and navigator series

Hello veronikauly!
Thanks for contacting us with your question!

I was trying to reproduce your problem, but in my case, everything is working correctly. I assume, that you used some more properties to configure the chart. Could you reproduce the issue in an online editor that I could work on? You can start here: https://jsfiddle.net/BlackLabel/pjqh4t5w/

I am looking for your response.
Best regards!
Hubert Kozik
Highcharts Developer
veronikauly
Posts: 7
Joined: Tue Jun 21, 2022 9:59 am

Re: Match between Y extremes scale between regular and navigator series

Sorry, you are right, I didn't give all details. There is also setExtremes on y function that extends y axis range:

Code: Select all

const chart = Highcharts.chart('container', {
  scrollbar: {
    enabled: true
  },
  rangeSelector: {
    enabled: true,
    inputEnabled: false,
    labelStyle: {
      display: 'none'
    },
    allButtonsEnabled: false,
    buttons: [],
  },
  navigator: {
    enabled: true,
    maskInside: false,
    maskFill: 'rgba(217, 217, 217, 0.4)'
  },
  series: [{
    data: [2.0000000001, 1.999999999, 2.0000000002, 1.9999999998],
    showInNavigator: true,
  }]

});
 chart.yAxis[0].setExtremes(0,2.5);
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Match between Y extremes scale between regular and navigator series

veronikauly,
Thank you for sharing the full configuration of the chart. If you want, you can also use setExtremes method on yAxis from navigator. It is the second axis in chart.yAxes array. You can check the demo below.

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

Feel free to ask any further questions!
Kind regards!
Hubert Kozik
Highcharts Developer
veronikauly
Posts: 7
Joined: Tue Jun 21, 2022 9:59 am

Re: Match between Y extremes scale between regular and navigator series

It works. Thank you very much!
hubert.k
Posts: 1164
Joined: Mon Apr 11, 2022 11:48 am

Re: Match between Y extremes scale between regular and navigator series

You're welcome! In case of any further questions, feel free to contact us again.
Hubert Kozik
Highcharts Developer

Return to “Highcharts Stock”