Reputation: 83
I wanted to create a chart with a fixed minimum and maximum. But the problem is that highcharts rounds it down and the values do not correspond.
I have two independent axes like this:
yAxis:[
{
title: {
text: "Teplota (°C)"
},
gridLineWidth: 0,
min: -40,
max: 50
},
{
title: {
text: "Srážky (mm)",
},
opposite: true,
gridLineWidth: 0,
min: 0,
max: 500
},
],
Here is a malfunctioning demo: http://jsfiddle.net/1p1n3zx6/
As you can see, I wanted the minimum to be -40 not -50 and maxium on the other 500 not 600.
Upvotes: 0
Views: 51
Reputation: 3384
Your tickInterval should be in the correct order for the chart to end on your min and maxes:
yAxis:[
{
title: {
text: "Teplota (°C)"
},
gridLineWidth: 0,
min: -40,
max: 50,
tickInterval: 10
},
{
title: {
text: "Srážky (mm)",
},
opposite: true,
gridLineWidth: 0,
min: 0,
max: 500,
tickInterval: 100
},
]
Here's the DEMO
Upvotes: 2