I've been trying for two days to find a way to set the maximum value of the yAxis on Highcharts.
I got a percentage column graphic, but the highest value in the series is 60, so it adjusts the axis to top at 70, I found a way to choose the start point, but no way to choose the end point.
What I really need is to set the yAxis from 0 to 100, so the data will be more accurately viewed as percentage
Thanks in advance, Bruno W.G.
A simpler way to go about this is using the tickInterval attribute: yAxis: { title: { text: 'Percent' }, tickInterval: 10, labels: { formatter: function(){ return this. value + '%'; } } }, That will force your axis intervals to show up as you requested.
The minimum tick interval allowed in axis values. For example on zooming in on an axis with daily data, this can be used to prevent the axis from showing hours. Defaults to the closest distance between two points on the axis.
Charts typically have two axes that are used to measure and categorize data: a vertical axis (also known as value axis or y axis), and a horizontal axis (also known as category axis or x axis).
style: Highcharts. Defaults to {"fontFamily": "\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif","fontSize":"12px"} .
Try this:
yAxis: {min: 0, max: 100}
See this jsfiddle example
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