Thorsten
(Thorsten A)
July 28, 2011, 10:05am
1
I use the Timeline Add-on to display an event that happens every 10 minutes. My data basis covers a few days.
The problem is that the horizontal scale displays the time but not the date, for example:
09:30:00 | 10:00:00 | 10:30:00 | …
I would prefer something like this:
13. Jul. 09:30 | 13. Jul. 10:00 | 13. Jul. 10:30 | …
Is it possible to modify this behavior at all? The documentation unfortunately does not cover this topic.
Thanks!
John
(John Ahlroos)
July 28, 2011, 10:39am
2
The date and time formats can be changed by modifying the DateFormatInfo instance returned by Timeline.getDateFormats(). Different date formats are used depending on which zoom level you are using.
...
DateFormatInfo formats = timeline.getDateFormats();
formats.setLongTimeFormat("dd. MMM. HH:mm");
...
Thorsten
(Thorsten A)
July 28, 2011, 11:00am
4
Another question to the same topic: is this data format modification also possible for the navigation area below the graph? This still shows time values only.
John
(John Ahlroos)
July 28, 2011, 11:56am
5
It should change the formats of the navigation area as well.
Did a quick test and your right, it doesn’t change them → made a ticket
#7332
about the issue.
In the mean time, I guess the only fix is to hide them if you don’t want to show the defaults. It can be done with a bit of CSS in your theme:
.v-timeline-widget-browser-scale-label{ display:none; }