Highcharts:如何消除系列和垂直轴之间的差距?

Cur*_*s86 0 highcharts

似乎 Highcharts 在 1. 系列线开始/系列线结束和 2. 垂直轴之间添加了一些间距。

有关更多详细信息,请参阅 jsfiddle 链接和下面的屏幕截图。

http://jsfiddle.net/8kbf2e1x/

Highcharts.chart('container', {

    title: {
        text: 'Solar Employment Growth by Sector, 2010-2016'
    },

    subtitle: {
        text: 'Source: thesolarfoundation.com'
    },

        xAxis: {
            categories: ['D1', 'D2', 'D3', 'D4']
    },

    yAxis: {
        title: {
            text: 'Number of Employees'
        }
    },
    legend: {
        layout: 'vertical',
        verticalAlign: 'bottom'
    },

    plotOptions: {
        series: {
        }
    },

    series: [{
        name: 'Installation',
        data: [43934, 52503, 57177, 69658]
    }, {
        name: 'Manufacturing',
        data: [24916, 24064, 29742, 29851]
    }, {
        name: 'Sales & Distribution',
        data: [11744, 17722, 16005, 19771]
    }, {
        name: 'Project Development',
        data: [null, null, 7988, 12169]
    }, {
        name: 'Other',
        data: [12908, 5948, 8105, 11248]
    }],

    responsive: {
        rules: [{
            condition: {
                maxWidth: 500
            },
            chartOptions: {
                legend: {
                    layout: 'horizontal',
                    align: 'center',
                    verticalAlign: 'bottom'
                }
            }
        }]
    }

});
Run Code Online (Sandbox Code Playgroud)

Highcharts - 自动添加间隙

我如何摆脱这些空间?我希望我的系列线在绘图区域内从 ened 扩展到结尾,没有间隙。是否可以使用较少数量的数据点来实现?(例如,在我的情况下,每个系列只有 4 个数据点)

Dee*_*015 6

检查点放置

当 pointPlacement 为“on”时,该点不会创建 X 轴的任何填充。

 plotOptions: {
  series: {
    pointPlacement: 'on'
  }
},
Run Code Online (Sandbox Code Playgroud)

小提琴演示