return the calculated intervals for timeline axis
Now the axis object has something called categories, which will show for regular axis what are the intervals. For timelines though we set in the data using timestamps and you dont know exactly what timeline is generated. And if you zoom in then the timeline is actually changed ( you can control this a bit with the maxZoom variable).
Example. I insert as data 3 values in a timeline. We can get the min and max of the timeline, but not the step. And min and max are relative to the state of zoom, not absolute so if I want to build an external slider with a trendline that has limits in exactly the same coordinates as the xAxis I cannot do that using the chart.xAxis object.
The Axis should be an absolute instrument which gives you stability and headings, not a design aid.
The tickInterval option, http://api.highcharts.com/highcharts#xAxis.tickInterval gives you a fixed tick interval.
-
valugi commented
And they are related with the dimensions of the chart.
-
valugi commented
I think that the tickPositions are the markings of the ruler, but now is just showing what you have selected to display on the axis.
-
valugi commented
I see this option has possible values : day, week, month. The nice part is that it updates the tickPositions, which is what I need. The bad part is that also has a design impact and updates the visible values on the xAxis with unecessary values. http://jsfiddle.net/7a8DC/7/
Imagine a ruler. A ruler has markings which show you the scale of what you are measuring and they are each millimeter. The ruler is the xAxis. The actual values dont belong to the ruler, they belong to the serie and they should be marked independently.
I think that the tickPositions are the markings of the ruler.
-
In order to set a fixed time interval of a month, you can use the undocumented xAxis.units option: http://jsfiddle.net/highcharts/7a8DC/
We haven't documented this yet because we are not sure we will stick with the current syntax.
-
valugi commented
This is helpful with daily data maybe, but with monthly values I cannot do 31 * 24 * 3600 * 1000 as value as it would not be precise. When you have a couple of years of monthly data, the count will go away.