(Time series chart) Series Color settings

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

(Time series chart) Series Color settings

Post by Reji » Thu Jan 17, 2002 1:36 am

Hi,

I have to plot more that 10 series in a single TimeSeries chart. But If series count is greater than 9 it is assigning same colors to different series. How can I change the color settings for each series?

Thanks,

Reji Mani

Reji

RE: (Time series chart) Series Color settings

Post by Reji » Thu Jan 17, 2002 2:33 am

Hi,

How can I display the section values (instead of Percent) in Pie Chart?

Thanking you,

Reji Mani

David Gilbert

RE: (Time series chart) Series Color settings

Post by David Gilbert » Thu Jan 17, 2002 8:25 am

Use the setSeriesPaint(...) method in the Plot class. You need to supply an array of Paint objects, the array can be any size you want. If there are more series than Paint objects, it just cycles back to the start of the array. The default array has 9 Paint objects in it. That's why you are seeing repeating colors...

Regards,

DG.

Reji

RE: (Time series chart) Series Color settings

Post by Reji » Thu Jan 17, 2002 8:52 am

Thanks David, Now it is working fine..

What about my second query? How can we set Pie Section Values instead of NAME_AND_PERCENT_LABELS ?

Regards,

Reji Mani

David Gilbert

RE: (Time series chart) Series Color settings

Post by David Gilbert » Thu Jan 17, 2002 6:41 pm

You would need to modify the code. It sounds like a sensible option, I'll look at implementing it when I get a chance...

DG.

Locked