Solved

JFreeChart: Time Series Chart

Posted on 2011-09-26
1
437 Views
Last Modified: 2012-05-12
I want to change the intervals displayed on the X axis of my TimeSeries chart.
Currently, the interval is 2 hours. So, I have the following labels: 02:00PM, 04:00PM, etc.
I want 02:00PM, 03:00PM, etc.

If possible, please provide some sample code. Thanks!
0
Comment
Question by:dshrenik
1 Comment
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
Comment Utility
Under
  final DateAxis axis = (DateAxis) plot.getDomainAxis();
replace one line with these two lines:
   axis.setDateFormatOverride(new SimpleDateFormat("hh"));
        axis.setTickUnit(new DateTickUnit(DateTickUnitType.HOUR,1));

Open in new window

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now