Highcharts 如何删除两个不同类别之间的highChart条形图之间的空格

Highcharts 如何删除两个不同类别之间的highChart条形图之间的空格,highcharts,highstock,Highcharts,Highstock,阅读JSFIDLE中的注释。 渲染图中c1中蓝色和绿色之间不应存在空格 在条形图制作2类3系列中 series: [{ name: 'A', data: [49.5, 71.5] }, { name: 'B', data: [null, 78.8] // The space should not be there in rendered graph between blue one and green one in c1

阅读JSFIDLE中的注释。 渲染图中c1中蓝色和绿色之间不应存在空格

在条形图制作2类3系列中

series: [{
        name: 'A',
        data: [49.5, 71.5]

    }, {
        name: 'B',
        data: [null, 78.8] // The space should not be there in rendered graph between blue one and green one in c1

    }, {
        name: 'c',
        data: [30, 78.8]

    }]

我能找到的唯一方法是通过指定X数据值自己控制条间距。注意,我在
plotOptions
中设置了
pointPadding:0
,因此我可以获得总体控制

    series: [{
        name: 'A',
        data: [[0.075,49.5], [1,71.5]]

    }, {
        name: 'B',
        data: [[0,null], [1.025,78.8]]// The space should not be there in rendered graph between blue one and green one in c1

    }, {
        name: 'c',
        data: [[-0.075,30], [1.05,78.8]]

    }]
更新


Uforutnatley不支持此选项,但您可以尝试通过translate()函数操作列,该函数允许ot移动SVG元素。

这是一个非常糟糕的技巧。。。这需要大量的数据操作和添加大量的元数据data@user2410148我同意这是一个黑客。不过,在Highcharts API的范围内,我可以想出最好的方法。