Default display of date-label on axis for new subclass?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Guus
Posts: 4
Joined: Fri Dec 31, 2004 12:01 pm
Location: the Netherlands
Contact:

Default display of date-label on axis for new subclass?

Post by Guus » Mon Jan 10, 2005 11:13 am

I created a new subclass of org.jfree.data.time.RegularTimePeriod. Now I'm trying to set a default label, which I want to be displayed on a chart which uses my new class:

Code: Select all

TimeSeriesCollection tsc = new TimeSeriesCollection();
TimeSeries series = new TimeSeries("Some String", MySubClass.class);
series.add(new MySubClass(d,m,y), value);
// etc, etc... 

tsc.addSeries(series);
I tried setting the four dateformatters (protected static final DateFormat DATE_FORMAT, DATE_FORMAT_SHORT etc) which I also found in org.jfree.data.time.Day, to force a default dateformat for my labels, but that doesn't seem to work.

Is there any way of doing this?
I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.

Locked