Display AM / PM when displaying the date.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Narayan
Posts: 30
Joined: Wed Apr 11, 2007 11:20 am
Location: Bangalore

Display AM / PM when displaying the date.

Post by Narayan » Mon Jun 25, 2007 11:43 am

Hi All,

I am using the TimeSeries chart, where my hour is coming as 0-23 hours as input. But when displaying it in the chart I want it to be displayed in the -12 hour format with AM and PM displayed
How can I go about it

Regards,
Narayan

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Jun 25, 2007 3:38 pm

Using the setDateFormatOverride() method in the DateAxis is the simplest option, although it's the least flexible if your tick size is dynamic. The other option is to define your own set of standard tick units for the axis.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked