Muliple Datasets with Different X Values.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
bsaul2
Posts: 1
Joined: Tue Apr 25, 2006 1:38 am

Muliple Datasets with Different X Values.

Post by bsaul2 » Tue Apr 25, 2006 1:42 am

Is it possible for datasets on the same graph have different values on the X-Axis, and if so which classes are the best to use in order to produce a nice solution.
Cheers :)

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 » Tue Apr 25, 2006 11:17 am

The answer depends a lot on what you are trying to display. But in general, the XYDataset interface allows for an independent set of x-values for each series in the dataset, so you don't even need multiple datasets.
David Gilbert
JFreeChart Project Leader

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

doudou
Posts: 27
Joined: Tue Mar 14, 2006 6:05 pm

Post by doudou » Wed Apr 26, 2006 10:07 am

To summarise the answer is yes: you can have completely different X values for each serie of a dataset.

However, the result might not be nice if X values are too far from one dataset to the other...

consider using many different charts in that case.

Locked