Duplicate Dates on X axis for TimeSeries Graph.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
register_anand
Posts: 3
Joined: Thu Sep 28, 2006 7:52 am

Duplicate Dates on X axis for TimeSeries Graph.

Post by register_anand » Thu Sep 28, 2006 8:05 am

Hi I am trying to use TimeSeries and Line Chart using XYDataSet, but my dates are duplicate as shown in the data below...

WeekEndDates Series1 Series2 Series3 Series4 Series5
11/6/2005 1 1 2 1 10
11/6/2005 1 1 3 1 15
11/6/2005 1 1 4 1 10
11/6/2005 1 1 5 1 10
2/5/2006 3 3 15 3 100
2/5/2006 3 3 2 3 10
2/5/2006 3 3 20 3 100
2/5/2006 3 3 25 3 100
5/7/2006 0 0 3 0 3
5/7/2006 0 0 10 0 33
5/7/2006 0 0 11 0 33
5/7/2006 0 0 12 0 33
5/7/2006 0 0 9 0 33
8/6/2006 100 150 99 200 150.5
8/6/2006 11 22 2 33 23
8/6/2006 11 22 3 33 23
8/6/2006 11230 2230 2 440 15
8/6/2006 11230 2230 234 440 15


Have some body faced this problem. How to produce the dataset for this kind of data

Thanks in advance for your co-operation.

Regards,

Anand.[/img]

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 » Thu Sep 28, 2006 10:57 am

I don't really understand this...if I asked you "what is the value of series3 on 11/6/2005?" what would be the answer? 2, 3, 4 or 5?

Are these observations perhaps from different times of the day? In that case, you should store them against the specific time.
David Gilbert
JFreeChart Project Leader

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

register_anand
Posts: 3
Joined: Thu Sep 28, 2006 7:52 am

Post by register_anand » Fri Oct 06, 2006 6:44 am

Thanks David for your valuable reply. I am sorry the data was in wrong format and now we dont have duplicate dates.

Regards,

Anand.

dave.dougherty
Posts: 1
Joined: Mon Dec 18, 2006 5:26 pm

Post by dave.dougherty » Mon Dec 18, 2006 6:09 pm

The obvious workaround is to jitter the time for each measurement by a small amount.

Workaround aside, the issue is real. Consider the situation in which a single sample is obtained at time T. This sample is split, and a measurement is made on each subsample (for example, using two sample preparations or measurement methods). It is unlikely the 2 reported measurement values are the same, both are valid measurements, and both come from the same sample time T. The desired plot is of measurement values vs sample time (a single line-connected timeseries plot, not as separate series for each preparation or method).

In this case, when asked "what is the value measured from the sample taken at T", there is in fact more than one answer.

Locked