Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Highcharts chart maximum yAxis value

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.

like image 605
bwagner Avatar asked Jul 27 '11 15:07

bwagner


People also ask

How do I change the y axis values in Highcharts?

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.

What is tick interval in Highcharts?

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.

What is y axis in chart?

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).

What is the default chart type in Highchart?

style: Highcharts. Defaults to {"fontFamily": "\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif","fontSize":"12px"} .


1 Answers

Try this:

yAxis: {min: 0, max: 100} 

See this jsfiddle example

like image 144
Peter Avatar answered Oct 01 '22 03:10

Peter