How to create two Yaxis on HighCharts
Question

Hello,

I'm tryng to create a chart whit 3 data points: itens, total itens and percentage(itens/total itens *100).

For that i need two Yaxis, one for itens and total itens (0 - 30k) and one for percentage (0 - 100).

I saw and try all these tutorials:

https://www.highcharts.com/demo/combo-multi-axes

https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/yaxis/opposite/

But if put the configuration on 'YaxisJSON', only the first is displayed.  And if I put the configuration on 'HighchartsJSON' the chart disappears.


Obs: the percentage data point is converted to line.


Hi Victor,

Just add a new series and specify its axis.

Something like:

    series: [{

        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],

        yAxis: 0

    }, {

        data: [90, 50, 100, 100, 110, 160, 160, 185, 264, 141, 96, 24],

        yAxis: 0

    }, {

        data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2],

        yAxis: 1

    }]

Is this it?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.