This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Jfree chart-xychart_x-axis date problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jfree chart-xychart_x-axis date problem" Watch "Jfree chart-xychart_x-axis date problem" New topic

Jfree chart-xychart_x-axis date problem

Ramachandran Sreejith

Joined: Aug 09, 2008
Posts: 9

I am using a xyline, (firstXYDataset,secondXYDataset)

I want to show the x-axis as date and time,
but the problem is series.add(double,double) supports type double

how can I pass the values like '2008-08-07 13:26:23' ?

my code

XYSeries series= new XYSeries("series1");
XYSeriesCollection dataset =new XYSeriesCollection();


Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
You'll need to use a CategoryDataset instead of an XYDataset.
I agree. Here's the link:
subject: Jfree chart-xychart_x-axis date problem
It's not a secret anymore!