Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
How to align time axis label ?
posted

I have a time x-axis that I can zoom in and scroll. I would like to ensure that my label are aligned with specified interval.

For example, if my data start at 1:53 and ends at 11:03, I would like to display labels at every hour but aligned on rounded hours (2:00 to 11:00 in that case). How I do that ?

Using "smart labels" does not properly works and give the expected result when initial time or duration is not already aligned. It seems that the first label is always at the axis beginning.

Using data interval does not solve completly the problem. I can compute the interval that I prefer but I haven't found how to specify where the labels should strart to be displayed (i.e. display the first label at 2:00 in the example above).

If the range is greater than one day or there is a date change during the displayed period, I like to display the date on every day changes. For ranges that are less than 2 days, I expect to also display time in HH:mm format (except on day changes).

In the source code, there seem to be a TickAlign property that might be what I need (except for custom formatting of the time but that part is explained elsewhere but using a renderer - I have not tried it yet) and would allows me to ensure that times are aligned properly according to the tickmark span and that dae are displayed at midnight.

 Also, when there is a daylight saving time change (for ex. 9 march this year), will I be able to properly display local time and display date at midnight even though one day might be 23 hours long or 25 hours long ?

Philippe

Parents Reply Children
No Data