Hi,
does this mean using type: 'datetime' instead of 'category'?
Unfortunately,
tickAmount option only has an effect on linear-type axes, so
datetime, logarithmic and category axes are not affected.
Categories are an array of labels on an axis for successive points. If you want to limit their number to 5, you should define exactly 5 categories. However, if you want to use a defined tickAmount value, you might consider entering the time as x-values of points, but without setting the axis type to
datetime. Like this:
https://jsfiddle.net/BlackLabel/utq0wka6/
In the demo above, however, you can notice a change in the appearance of the chart. This is because the time values are interpreted numerically this time, so if the time was the same in two categories, both points lie on one vertical line.
does this mean using type: 'datetime' instead of 'category' will help set local time using useUTC?
Yes. But only for datetime values formatted by default. You're using a formatter there, so even if you were to drop the category at the expense of proper datetime values, you're overriding that logic.
Unfortunately, it's hard for me to advise you more. If I had known what are you striving for and why maybe I could have offered you any alternatives.
Kind regards!