高图:我们可以减少分组柱形图中两个条形之间的距离吗

use*_*931 2 bar-chart highcharts column-chart

使用 Highcharts 中的此示例显示具有负值的分组柱形图 https://www.highcharts.com/demo/column-negative

当我们在 x 轴上的属性较少时,相同值的两个条形之间的距离变宽。我们可以通过使用任何选项来减少这个距离并使两个条形每个月看起来彼此靠近吗?附上问题的输出。 示例图表

我使用的选项是:

plotOptions: {
    column: {
       dataLabels: {
          enabled: false
       },
       pointWidth: 15
    },
    series: {
       centerInCategory: true
    }
},
Run Code Online (Sandbox Code Playgroud)

小智 7

使用groupPaddingandpointWidth属性可以调整分组列之间的空间。

 plotOptions: {
    column: {
      dataLabels: {
        enabled: false
      },
      groupPadding:0.35,
      pointWidth: 25
    }
  },
Run Code Online (Sandbox Code Playgroud)

API:
https : //api.highcharts.com/highcharts/series.column.groupPadding
https://api.highcharts.com/highcharts/series.column.pointWidth

现场演示: https :
//jsfiddle.net/BlackLabel/kfwz7gce/