I can't figure out how to change :
| |
| |
| |
| |
| |
-----------------------------
03-2004 48-2004 121-2004
(DD-YYYY)
into
| |
| |
| |
| |
| |
|----------------------------
03 48 121
(DD)
is this possible? Thanks for your help in advance.
How do I change the date format for the axis in TimeSeries ?
You could try using java.text.SimpleDateFormat:
Or if you just want the date
Then override the dataformat in the horizontal axis:
Hope this helps.
Code: Select all
String dateFormat = "yyyy/MM/dd HH:mm";
Code: Select all
String dateFormat = "dd";
Code: Select all
XYPlot plot = chart.getXYPlot();
DateAxis axis = (DateAxis) plot.getDomainAxis();
axis.setDateFormatOverride(new SimpleDateFormat(dateFormat));