Color and time series

Discussion about JFreeChart related to stockmarket charts.
Locked
Vidhya
Posts: 2
Joined: Mon Aug 31, 2009 3:55 pm
antibot: No, of course not.

Color and time series

Post by Vidhya » Mon Aug 31, 2009 4:06 pm

I am using
renderer.setSeriesPaint(count, color.green);
to set the color of a time series

After adding color to 3 time series, i am removing 2nd time series from the TimeSeriesCollection. Now the color of the 3rd series is changed to 2nd series color.

Can you please let me know how to maintain the color of the time series even if I delete any one of the time series in the TimeSeriesCollection.

Thanks In Advance
Vidhya

vigneshb
Posts: 3
Joined: Mon Aug 31, 2009 2:25 pm
antibot: No, of course not.
Location: Halifax, Canada
Contact:

Re: Color and time series

Post by vigneshb » Mon Aug 31, 2009 4:47 pm

All it does is when you remove your 2nd time series the index of 3rd timeseries(2) is now changed to (1). So you just have to update when you remove it say render.setSeriesPaint(1, (the third series color));

Locked