TimeSeries Chart with special date format

Help
2003-03-27
2013-01-13
  • I'm wondering if there is a way to specify dates in a non-US format for a TimeSeries chart, the default date format is not always the better choice

     
    • Guido Laures
      Guido Laures
      2003-03-27

      Implement a ChartPostProcessor like that:
      ((DateAxis)chart.getXYPlot().getHorizontalValueAxis()).setDateFormatOverride(new SimpleDateFormat("yyyy/MM/dd")
      Please refer to JFreeChart's JavaDoc for exact API

      Regards,
      Guido

       
      • Michael
        Michael
        2006-11-24

        Can you please post the hole PostProcessor. Your code will not run.
        My problem is in a TimeSeries chart. I display 24h. the x axis displays only hours but I need as well the date dd.mm.yyyy
        Thanks very much
        Michael

         
    • Great that works, but Do you if there is a way to change this format only in some cases, for example when the date rango to chart is 10 years, in the graph appears only the years, and that is really great, but when the date range are only months appears month-year, in this case is when I would like to change the date format.

      Note: I always insert the data using the Month unit time