Adjusting the automatic tickplacement on a datetime xAxis
We often use high charts to display statistics of monthly performance data. The data we pass is a monthly periodicity with knots on calendar month end dates.
HighCharts automatic tick placement using data time xAxis puts the tick mark on the 1st day of the month. For example, in this jsfiddle example when you hover over a point it looks like the April data is over the June tick. http://jsfiddle.net/gfzs5/1/
Can we adjust the positioning of the ticks to appear at the month end instead of month start?
-
Philzen commented
This is somehow related: https://highcharts.uservoice.com/forums/55896-highcharts-javascript-api/suggestions/20302792-position-tick-labels-between-ticks-on-a-date-time
Here we want to place it between the ticks – so maybe it's an option to do all in one by introducing a "labelAlignment" option such as "left" (current default), "right" (this feature request), "center" (feature request linked above).
-
Rachel Cohen commented
Any update on the grid axis module putting the labels in intervals?
-
We are now working on a grid axis module, which will put the labels in intervals. See http://jsfiddle.net/highcharts/gfzs5/4/ .
-
Benoît Chantre commented
Any changes since 2013?
Is it still necessary to write our own tickPositioner callback? -
Gregory Schwedock commented
@Torstein-Hønsi, I've tried using the tickPositioner to no avail and written a detailed question on stackoverflow with a complete jsfiddle example: http://stackoverflow.com/questions/30312437/how-to-use-highstocks-tickpositioner-to-set-tick-at-end-of-month
Any ideas highcharts folks?
-
There's no option for using the last date of the month, but you can create your own tickPositioner callback: http://api.highcharts.com/highcharts#xAxis.tickPositioner