温馨提示:本文翻译自stackoverflow.com,查看原文请点击:highcharts - Is It possible to plot a water fall chart as shown in the below image?
highcharts

highcharts - 是否可以绘制下图所示的瀑布图?

发布于 2020-04-04 00:04:13

我需要绘制如下的瀑布图。在图表中,每一列都是一种类别,并且通过添加子类型来计算值。我们如何在底部显示子类型(例如:气体1,气体2),在顶部显示类别(例如3类)。高图有可能吗?

在此处输入图片说明

查看更多

提问者
Jomon
被浏览
102
ppotaczek 2020-01-31 20:12

您可以xAxis在类别中使用两个例如:

xAxis: [{
  opposite: true,
  lineWidth: 0,
  categories: ['Start', 'Category1', 'Category2', 'Category3', 'Category4', 'Balance']
}, {
  linkedTo: 0,
  lineWidth: 0,
  categories: ['', 'Sub-Category 1', 'Liquid 1<br>Liquid 2', 'Gas 1<br>Gas 2', 'Solid 1', ''],
  labels: {
    rotation: 0,
    y: -10
  }
}]

现场演示: https : //jsfiddle.net/BlackLabel/a9bzeqw4/1/

API参考: https : //api.highcharts.com/highcharts/xAxis.labels