CombinedXYPlot seriespaint

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

CombinedXYPlot seriespaint

Post by Rene Teekema » Thu Nov 07, 2002 4:40 pm

Hi,

I've been using a CombinedXYPlot for presentation of XYSeriesCollections.
In the previous version of JFreeChart, the colors of the series needly cycled through the default Paint set.
Now after upgrading to version 0.9.4, each plot starts with the first color in the Paint set which is red.

What has happened?? And can I recover from this?

Regards

Dave Gilbert

Re: CombinedXYPlot seriespaint

Post by Dave Gilbert » Fri Nov 08, 2002 12:26 am

Hi Rene,

Prior to 0.9.4, all the subplots took the colors from the parent plot, and there was some horrible code trying to synchronise the series indices to make sure all the colors were unique. It didn't work that well.

In 0.9.4, each subplot uses its own list of colors. This is much easier to follow, especially when you have subplots within subplots. But since all the plots start out with the same set of default colors, there is currently the odd behaviour that everything comes out red. The workaround is to manually set the colors for each subplot before displaying the chart. I'll try to change it so that each subplot gets a different color set by default...

Regards,

DG

Rene Teekema

Re: CombinedXYPlot seriespaint

Post by Rene Teekema » Fri Nov 08, 2002 8:36 am

OK, thanks for your reply.
Looking forward to version 1.0

Regards

sebastian

Re: CombinedXYPlot seriespaint

Post by sebastian » Fri Nov 08, 2002 9:49 am

HI

same problem here... I used to call the setSeriesPaint Method on every subplot and on the parent plots and that worked fine for me with 0.9.3 , but since i don't know in advance which and how many subplots will be used in the combined plots i have to set colors somewhat dynamically. Is there a way to extract subplots from an OverlaidXYPlot, change colors of subplots and add them back to Overlaid plot?? Or is something like this planned ??

regards

Sebastian

Locked