posted 16 years ago
I found the solution too.
Rather than using DateAxis, use the PeriodAxis and PeriodAxisLabelInfo, as follows:
PeriodAxis domainAxis = new PeriodAxis("Date");
domainAxis.setAutoRangeTimePeriodClass(Month.class);
domainAxis.setMajorTickTimePeriodClass(Month.class);
PeriodAxisLabelInfo[] info = new PeriodAxisLabelInfo[2];
info[0] = new PeriodAxisLabelInfo(Month.class, new SimpleDateFormat("MMM"));
info[1] = new PeriodAxisLabelInfo(Year.class, new SimpleDateFormat("yyyy"));
domainAxis.setLabelInfo(info);