Solved

JFreeChart: Time Series Chart

Posted on 2011-09-26
1
449 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 36624636
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

724 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