score:2

Accepted answer

The problem is with using categories: categories: yearmontharray, - when you use categories, then xAxis.type is set to category, not datetime.

So you have a couple of solutions:

  • use formatter for labels, there preprocess your category string to get desired output
  • change your format on backend side, to return categories formatter in a proper way
  • instead of using categories, use datetime axis. More about can be found here.

In genera, I advice to read about axes(!) in Highcharts. The better you understand library, the better results you will have.


Related Articles