Search code examples
highchartsaxismin

how to make highchart x axis meet y axis at min value of yAxis


i have a highstock chart and i set min value in yAxis, what i need is that xAxis line cross yAxis on specified min value of y axis, but there is a gap between them?

yAxis: {
  opposite: true,
  crosshair: false,
  min:10000,
},

js fiddle enter image description here


Solution

  • Try setting the yAxis option startOnTick to false, that to force a start from the first tick that is your minimum.

       yAxis: {
         startOnTick: false,
         max: 80000,
         min: 10000,
       },
    

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