score:1

To achieve it you need to position those ticks by using the tickPositions feature and next set wanted value to display by label by using the labels.formatter feature.

Code:

  xAxis: {
    tickPositions: [0.5, 2, 3.5],
    crosshair: true,
    labels: {
      formatter() {
        let value = Math.floor(this.value);

        if(!value) {
            value = 1
        }
        return 'group ' + value
      }
    }
  },

Demo: https://jsfiddle.net/BlackLabel/ynj9ka4w/

API: https://api.highcharts.com/highcharts/xAxis.labels.formatter

API: https://api.highcharts.com/highcharts/xAxis.tickPositions


Related Query