score:2

Accepted answer

Have you tried adding gridLineWidth: 0 or tickWidth: 0?

So the code would look something like:

xAxis: {
  type: 'datetime',
  crosshair: true,
  showFirstLabel: true,
  showLastLabel: true,
  gridLineWidth: 0,
  tickWidth: 0,
  categories: props.currentPeriodDays,
  labels: {
    step: 20
  }
}

Hope this helps

score:0

While the accepted answer does answer the question that was asked, let me offer a different approach for reference.

You are plotting time-series data, which Highcharts handles extremely well when using an axis type of datetime, rather than trying to shoehorn dates into a category axis.

Without using categories, the chart will automatically produce a logical set of ticks/gridlines/axis labels, rather than creating them for each data point.

If the results don't completely meet your requirements, you can easily correct them by setting an appropriate tickInterval.

If you don't want any tickmarks at all, you can still hide them by setting the tickWidth or the tickLength to 0, but by sending the data as datetime data, and using a datetime axis, you may eliminate the need to, as there won't be so many created (and you will have a cleaner, more logical chart object as well).

References:

Demos:


Related Query

More Query from same tag