How to set the maximum value of a yAxis chart of a Highcharts chart

I have been trying for two days to find a way to set the maximum value yAxis on Highcharts.

I got a graphic percent symbol , but the highest value in the series is 60, so it adjusts the axis to top by 70 , I found a way to select the start point , but can’t select the end point .

I really need to set yAxis from 0 to 100 , so the data will be more accurately viewed as a percentage

Thanks in advance, Bruno V.G.

+47
javascript highcharts
Jul 27 '11 at 15:44
source share
3 answers

Try the following:

yAxis: {min: 0, max: 100} 

See this jsfiddle example

+92
Jul 27 '11 at 18:35
source share

Interaction with the answer link above mentioned in the answer above sets the maximum value with the option

 yAxis: { max: 100 }, 

In a similar line, min can be specified. Thus, if you want to set the min-max value, then

 yAxis: { min: 0, max: 100 }, 

If you use the php library HighRoller for integration, if the graphics are Highchart, you just need to set the parameter

 $series->yAxis->min=0; $series->yAxis->min=100; 
+5
Apr 11 '12 at 5:16
source share

Alternatively, you can use the setExtremes method,

 yAxis.setExtremes(0, 100); 

Or if you want to set only one value, just leave the other as null

 yAxis.setExtremes(null, 100); 
+2
Jan 23 '17 at 6:05
source share



All Articles