Setting max and min range in Highcharts with multiple y-axis

Highcharts with multiple y-axis
Let's say you have that kind of chart/graph above, and then you want to set its min and max range...Nah, here's the code:

chart: {
    renderTo: 'container',
    type: 'line',
    //width: 800,
    height: 450,
    alignTicks: false
yAxis: [{ //primary y axis  
    min: 0,
    max: 100,
    tickInterval: 20
}, {
    min: 0,
    max: 150,
    tickInterval: 30,
    opposite: !0

You just need to add alignTicks: false in your chart option then set the y-axis' tickInterval. It is much better to divide each max range with the same value.

Popular posts from this blog

Add/Subtract Single Digit Number in Assembly Language

Set table width to 100% on PDF export in Datatables

A Better Archive Page for Blogger