高图中的列间距

gok*_*ine 3 javascript highcharts

我正在与Highcharts合作,遇到了一个我要克服的小问题。

我创建了一个jsfiddle,因此您可以看到我的问题:

http://jsfiddle.net/gokninski/qkBsA/

这是我正在使用的代码:

$('#output-chart').highcharts({
        chart: { type: 'column' },
        title: { text: null },
        xAxis: { categories: ['Column 1', 'Column 2', 'Column 3', 'Column 4'] },
        yAxis: { allowDecimals: false, min: 0, labels: { format: '£{value}' }, title: { text: ''} },
        plotOptions: { column: { stacking: 'normal'}, series: { pointWidth: 50, pointPadding: 0, groupPadding: 0} },
        series: [{
            name: 'Product 1 Element 1',
            data: [0, 100 - 125, 100 - 150, 100 - 175],
            stack: 'Item1'                
        }, {
            name: 'Product 1 Element 2',
            data: [100, 125, 150, 175],
            stack: 'Item1'                          
        }, {
            name: 'Product 2 Element 1',
            data: [0, 100 - 125, 100 - 150, 100 - 175],
            stack: 'Item2'                            
        }, {
            name: 'Product 2 Element 2',
            data: [100, 125, 150, 175],
            stack: 'Item2'                    
        }]
    });
Run Code Online (Sandbox Code Playgroud)

因此,每列中都有两个小节,我想将这两个小节彼此相对放置,但各列之间仍存在间隙。

我希望这是有道理的!

任何帮助将不胜感激。

非常感谢

G。

Paw*_*Fus 5

如果您想围在一起,但在一对之间也有填充,则只需设置即可pointPadding,不要改变pointWidth。参见:http : //jsfiddle.net/Fusher/FpKjQ/16/