Here is an example of what I am trying to do.
http://jsfiddle.net/na74Lndg/1/
how can I avoid highcharts inserting the 12.5 yAxis line.
If the series has any data that goes 11 then I do want to see the 12.5 line but not if there is nothing there.
I have tried using softMax but that does not solve the issue,
yAxis: {
softMax: 10
}
I sure can write code to calculate the max data series and set the max accordingly, but looking for an answer without writing to much code.
You can set the maxPadding to 0 (or some other number that accomplishes your desired result).
yAxis: {
maxPadding: 0,
...
}
Updated fiddle:
Reference:
maxPadding: Number Since 1.2.0 Padding of the max value relative to the length of the axis. A padding of 0.05 will make a 100px axis 5px longer. This is useful when you don't want the highest data value to appear on the edge of the plot area. Defaults to 0.05.
You can also look at the endOnTick property, which would allow the axis to extend beyond 10, but not draw the next tick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With