多个Y轴 - 边距

时间:2016-12-08 16:53:58

标签: highcharts

我的图表上有多个Y轴,它们没有标题。我找不到一个允许我在轴之间添加一点空间的属性。可能吗 ?这就是我现在拥有的。你可以看到它看起来非常压扁。

enter image description here

1 个答案:

答案 0 :(得分:0)

您可以使用offset属性。

示例:

  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 }
    }]

(图表边距可能还需要调整以适应,具体取决于您的设置)

小提琴:

参考: