I have created a TimeSeriesChart with four timeseries in which I would like to display different quarters on the x-axis an some numbers on the y-axis. No problem so far, works fine. But is it possible to override the Dateformat with an string like "Quarter 1", "Quarter 2", ... instead of displaying the first day of the current quarter ("01.01.2008", "01.04.2008",...)?
This is my current code:
Code: Select all
XYPlot plot = chart.getXYPlot();
DateAxis axis = (DateAxis) plot.getDomainAxis();
axis.setDateFormatOverride(new SimpleDateFormat("dd.MM.yyyy"));
DateTickUnit unit=new DateTickUnit(DateTickUnit.MONTH, 3,new SimpleDateFormat("dd.MM.yyyy"));
axis.setTickUnit(unit);
...
tsStart.addOrUpdate(new Quarter(quartal, jahr), anzahl);
...
So I hope you understand what I mean, my english is not so good at all.
Thank you for your help!