Fixed y-axis label width in Highcharts

后端 未结 3 1692
心在旅途
心在旅途 2021-02-19 00:05

I\'m building a data presentation where two Highcharts charts are stacked vertically and are intended to share the same x-axis units and alignment. Like so:

3条回答
  •  无人共我
    2021-02-19 00:46

    A little hacky way, but should work:

    • set for both xAxis width, e.g. 400px
    • set for all axis (xAxis and yAxis) right, e.g. 20px

    Now yAxis should have the same width and also the same extremes etc.

    Another (and maybe even better) solution is to use two panes for Highcharts. It works exactly the same way as in Highstock, see example: http://www.highcharts.com/stock/demo/candlestick-and-volume

提交回复
热议问题