I have a chart which contains two series, and each of them has its own yAxis
. I need to automatically set the second axis maximum to 13.5% of the first axis maximum. For example, if the first axis goes from 0 to 100, then I want the second axis to go from 0 to 13.5 (No matter the second series value).
The only way I found to achieve this is to calculate the max of the first series, and then affect it to the max of the second axis. But this is not what I really want. See this JSFiddle.
My fiddle seems to work, but in reality, I am not calculating the second axis maximum in a good way, as I refer to the first series maximum and not the first axis maximum.
Does anyone knows a general way to set the max of an axis accordingly to the max of another axis ?
The linkedTo
attribute from Highcharts axis is close to what I want, but I need to add a coefficient. I don't know how to proceed.