Accepted answer

you can set for xaxis:

    xaxis: {
        labels: {
            enabled: true,
            formatter: function () {
                return categories[this.value];
        tickinterval: 1,
        minpadding: 0,
        maxpadding: 0,
        min: 0.5,                     // remove padding
        max: categories.length - 1.5, // remove padding
        startontick: false,           // allow to start not from tick
        endontick: false              // allow to end not at tick

example: - turn on revenue - you will see that first and last column will be cut off.


the reason it is doing this is because, even though the series is hidden on load, you have a column series that needs the width to display. if you just show series "revenue" you can see it is using that empty space that was there before. you could also play with tickpixelinterval - but for that you need to not use a categorized xaxis.

see this example. i also set showempty to false for both yaxis elements.


if you change the last of series from

    type: 'column',


    type: 'areaspline',

there will be no gaps on left and right side. do you need type column?

solution for your problem is answered here highcharts remove space across the x-axis by user dusty. you have to setup for x-axis:

    min: 0.5,
    max: 10.5,

note: if you turn your column type series to visible: true half of the first and the last column will be cut-off.

Related Query

More Query from same tag