1

我想使用 highcharts 创建一个柱状图类型。我尝试过类似下面的方法:

在此处输入图像描述

  • 我想用以下自定义实现下面的图表:条形图的高度与 Y 轴值之间的间隙相同,如图所示

  • 消除钢筋之间的间隙。

4

2 回答 2

0

设置和到。pointPadding_groupPaddingborderWidth0

 series: [{
  pointPadding: 0,
  groupPadding: 0,
  borderWidth: 0,
  name: 'Temperatures',
  ...
}]

现场示例:https ://jsfiddle.net/smqrhn09/

于 2018-05-17T10:31:08.383 回答
0

You can achieve the desired behavior by fiddling around with pointRange in your series

series: [{
    name: 'Temperatures',
    data: [
        [-9.9, 10.3],
        [-8.6, 8.5],
        [-10.2, 11.8],
        [-1.7, 12.2],
        [-0.6, 23.1],
        [3.7, 25.4],
        [6.0, 26.2],
        [6.7, 21.4],
        [3.5, 19.5],
        [-1.3, 16.0],
        [-8.7, 9.4],
        [-9.0, 8.6],
    ],
     pointRange: 2
}]

In the example I have set it to 2, as that closes almost the whole gap between bars. Here you can find the working JSFiddle.

于 2018-05-16T13:23:47.727 回答