问题
I have multiple Y axis on my chart, they have no titles. I cannot find a property that would allow me to add a bit of space between the axis. Is it possible ? This is what I have now. As you can see it looks very squashed.
回答1:
You can use the offset
property.
Example:
yAxis: [{
offset: 0,
lineColor: Highcharts.getOptions().colors[0],
title: { text: 0 }
},{
offset: 50,
lineColor: Highcharts.getOptions().colors[1],
title: { text: 0 }
},{
offset: 100,
lineColor: Highcharts.getOptions().colors[2],
title: { text: 0 }
}]
(chart margin may also need to be adjusted to suit, depending on your set up)
Fiddle:
- http://jsfiddle.net/jlbriggs/pekhvvcq/
Reference:
- http://api.highcharts.com/highcharts/yAxis.offset
来源:https://stackoverflow.com/questions/41044743/multiple-y-axis-margin