I use the Month(int month, int year) contructor and the month displayed is like "January 2002". And I want it to be like "Jan-2002" as shown in the demo. Anybody know how this works?
Thanks a lot!
Joanne
display month in abbreviation format
Re: display month in abbreviation format
Hi Joanne,
Do you mean the axis labels?
The Month class (a subclass of TimePeriod) can be used to represent your data, but it isn't used by the DateAxis at all. What happens is your Month class will be converted to a Number (actually a Long representing the milliseconds since 1-Jan-1970) and plotted as a value against the axis. The labels on the DateAxis are converted from milliseconds back to Date objects and formatted using a DateFormat object.
You'll find all the formats at the bottom of the DateAxis.java class.
Regards,
DG.
Do you mean the axis labels?
The Month class (a subclass of TimePeriod) can be used to represent your data, but it isn't used by the DateAxis at all. What happens is your Month class will be converted to a Number (actually a Long representing the milliseconds since 1-Jan-1970) and plotted as a value against the axis. The labels on the DateAxis are converted from milliseconds back to Date objects and formatted using a DateFormat object.
You'll find all the formats at the bottom of the DateAxis.java class.
Regards,
DG.