multiple Y axis - margin

微笑、不失礼 提交于 2020-02-02 16:15:49

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!