With Highcharts, I wanted to create a column chart without left/right spacing. For that, I found a few posts saying to set xAxis min/max to 0.25 and number-of-items – 1.25, which seems to remove horizontal spacings.

But then, depending on the values, the columns on the edges will go up to the top and their labels won’t be visible anymore.

Example:
Two charts that are only different in that the first one has xAxis min/max set to 0.25/2.75.
https://codepen.io/rolfboom/pen/qBvrQvZ

It seems this only happens for outer values if they are bigger (a tenth/hundredth) than the rest, like:
[20, 10, 10, 20]
[100, 100, 100, 200]

I have found that if I set an yAxis max value (to the biggest value of the dataset) manually, then the columns are displayed correctly again.

Does anyone know if this is a bug or if I am just using min/max wrong?

Codepen code from above URL:
HTML

<script src="https://code.highcharts.com/11.3.0/highcharts.js"></script>
<div id="container1"></div>
<div id="container2"></div>

JS

Highcharts.chart('container1', {
  chart: {
    type: 'column',
  },
  title: {
    text: '',
  },
  yAxis: {
    tickAmount: 0,
    labels: {
      enabled: false,
    },
  },
  xAxis: {
    labels: {
      enabled: false,
    },
    tickLength: 0,
    min: 0.25,
    max: 2.75,
  },
  plotOptions: {
    "column": {
      dataLabels: {
        enabled: true,
        inside: false,
      },
    }
  },
  series: [
    {
      name: '',
        data: [122, 56.2, 87, 191],
    },
  ],
});

Highcharts.chart('container2', {
    chart: {
      type: 'column',
    },
    title: {
      text: '',
    },
    yAxis: {
      tickAmount: 0,
      labels: {
        enabled: false,
      },
    },
    xAxis: {
      labels: {
        enabled: false,
      },
      tickLength: 0,
            //min: 0.25,
            //max: 2.75,
    },
    plotOptions: {
      "column": {
        dataLabels: {
          enabled: true,
          inside: false,
        },
      }
    },
    series: [
      {
        name: '',
                data: [122, 56.2, 87, 191],
      },
    ],
});