我想使用 highcharts 创建一个柱状图类型。我尝试过类似下面的方法:
我想用以下自定义实现下面的图表:条形图的高度与 Y 轴值之间的间隙相同,如图所示
消除钢筋之间的间隙。
设置和到。pointPadding
_groupPadding
borderWidth
0
series: [{
pointPadding: 0,
groupPadding: 0,
borderWidth: 0,
name: 'Temperatures',
...
}]
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.