Highcharts垂直同步图表

时间:2018-10-21 18:31:13

标签: charts highcharts synchronization

我正尝试在此链接https://www.highcharts.com/demo/synchronized-charts上构建同步图表,但切换x和y轴以查看图表,如下图所示:

enter image description here

如何做到?任何帮助,不胜感激! 谢谢!

1 个答案:

答案 0 :(得分:1)

您需要为图表启用inverted属性,并为容器设置正确的尺寸,例如:

JS:

chart: {
    inverted: true
}

CSS:

.chart {
    width: 33%;
    height: 600px;
    margin: 0 auto;
    display: inline-block;
}

实时演示:https://jsfiddle.net/BlackLabel/cdok7w0L/

API:https://api.highcharts.com/highcharts/chart.inverted