Remove the line and tickers on the X axis

charts, highcharts, jquery

Solution

Found the solution.

While for the Y axis, it is enough to just specify no title, to have everything hidden; for the X axis you need to specify every single option:

xAxis: {
  lineWidth: 0,
   minorGridLineWidth: 0,
   labels: {
       enabled: false
   },
   minorTickLength: 0,
   tickLength: 0
}

This will give the same result that you get on the Y axis, just disabling the label.

Problem

Tried to remove the X axis line and tickers from a highcharts chart, but it seems that it won't work. ``` xAxis: { categories:[], labels: {enabled: false}, tickLength: 0, } ``` I was able to remove the x axis label and everything else, but no matter what I do, the line at the bottom of the chart, and the various ticks continue to stay there. Strange enough, on the Y axis I don't get this behavior: once I removed the label, everything else disappeared, leaving no line and no ticks. Is this a bug in Highcharts?

Original source