【问题标题】:Is It possible to plot a water fall chart as shown in the below image?是否可以绘制如下图所示的瀑布图?
【发布时间】:2020-01-31 20:12:51
【问题描述】:

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

【问题讨论】:

    标签: highcharts


    【解决方案1】:

    您可以在类别中使用两个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

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-13
    • 1970-01-01
    • 1970-01-01
    • 2011-12-31
    • 2021-10-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多