I am amazed how difficult this is. Not an optimal solution, but the best I can dream up with HighChart's api:
var someData = [1,5,82,9,300,5,42,199,5,6,99,1,56,52,250,64];
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
yAxis:{
min: -10,
tickInterval: 1,
labels: {
formatter: function() {
if (this.value < someData[0])
return null;
else if (this.value == someData[0])
return this.value;
else if (this.value % 50 == 0)
return this.value;
}
}
},
series: [{
data: someData
}]
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…