I know that the date format of the labels can be controlled via timeAxis.setDateFormatOverride(tickDateFormatter);
However, it is a 'global' configuration, meaning that if there are 5 labels would be printed, all of them will be in that format.
Is it possible to inject with individual setting for each label?
Between, I found that if a segmented time line is set, say mon 9:00 to fri 17:00 (fri 17:01 - mon 8:59 are days off)
The 'segment end' label MAY overlap with following 'segment head' label.
Is it a possible bug or is there any margin option for the 'segment time line' case ?
Thanks.
2 questions on time axis labels
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: 2 questions on time axis labels
The segmented timeline labelling is not very clever, so this is most likely a bug / limitation. If you want to, you can subclass the axis and override the refreshTicks() method and write your own code to determine the tick marks that will be labelled.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: 2 questions on time axis labels
Thanks for your reply.
And concerning the following question:
I know that the date format of the labels can be controlled via timeAxis.setDateFormatOverride(tickDateFormatter);
However, it is a 'global' configuration, meaning that if there are 5 labels would be printed, all of them will be in that format.
Is it possible to inject with individual setting for each label?
I believe it is a limitation as well. Which method(s) should I override to overcome it?
And concerning the following question:
I know that the date format of the labels can be controlled via timeAxis.setDateFormatOverride(tickDateFormatter);
However, it is a 'global' configuration, meaning that if there are 5 labels would be printed, all of them will be in that format.
Is it possible to inject with individual setting for each label?
I believe it is a limitation as well. Which method(s) should I override to overcome it?