Reputation: 749
For my highchart, I want to set maximum value of 100
and minimum value of 1
.
When I try to code like this, it outputs is 0-100
not 1-100
.
If I change or remove max range
, it works fine for small values of y
.
yAxis: {
min:1,
max:100,
reversed: true,
title: {
text: 'Rank'
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
Upvotes: 2
Views: 304
Reputation: 19103
You can force the y-axis to have specific tick intervals using the tickPositioner function in the y-axis e.g.
tickPositioner: function () {
var positions = [1, 25, 50, 75, 100];
return positions;
}
Upvotes: 3
Reputation: 3225
You can try
chart.yAxis[0].setExtremes(1,100);
http://api.highcharts.com/highcharts#Axis.setExtremes
If it is dynamic data/tick data you can set
startOnTick : false
This problem is discussed here also http://forum.highcharts.com/viewtopic.php?f=9&t=6862
Upvotes: 3