same x-value

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Bjarni

same x-value

Post by Bjarni » Fri Nov 08, 2002 2:46 pm

Hi ...

I'm getting this error :
XYSeries.add(...): x-value already exists.

why shouldn't you be allowed to add data which has the same x-value ?
Any way to fix this ?

regards
Bjarni

Dave Gilbert

Re: same x-value

Post by Dave Gilbert » Mon Nov 11, 2002 10:39 am

You can have duplicate x-values if you use the second constructor. The reason for not allowing duplicates is just a behaviour that transferred across from the BasicTimeSeries class. I think I'll change the default behaviour to allow duplicates, then make it an option to disallow them if necessary (you can be sure that someone will want to).

Regards,

DG

Locked