Change the order in which series are added to the dataset.

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Pavvi
Posts: 7
Joined: Thu Jul 20, 2006 11:45 am

Change the order in which series are added to the dataset.

Post by Pavvi » Wed Jul 26, 2006 7:42 am

Hi,

We know that each series occupies a certain area in XYAreaChart based on the given data.
Would like to add series onto the dataset based on the decreasing order of the area that a series may occupy in XYAreaChart.
That is, would like to change the sequential order of adding series to a adding series based on the area they might occupy in XYAreaChart.
Does anyone has any idea or help me in implementing this?

Thanks
Pavvi.

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 » Wed Jul 26, 2006 2:29 pm

JFreeChart will just plot the series in the order that they appear in the dataset. You could probably write some code to calculate the "area" for each series, then create a new dataset and add the items in order of decreasing (or increasing) area. But JFreeChart can't do that for you.
David Gilbert
JFreeChart Project Leader

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

Locked