MultiplePiePlot question

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
timw
Posts: 20
Joined: Fri Mar 18, 2005 12:36 pm
Location: London

MultiplePiePlot question

Post by timw » Mon May 23, 2005 11:02 am

Hi,
Does anyone know how to get a MultiplePiePlot to work with a subclass of a PiePlot? I tried changing MultiplePiePlotDemo1 to get a RingPlot instead of a PiePlot and it threw a class cast exception

There isn't any useful info in the developer guide.

Thanks,
Tim

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 May 25, 2005 7:33 am

You can change the "template" used for each subchart by calling the setPieChart() method in the MultiplePiePlot class. You provide a JFreeChart instance that uses a PiePlot (or any subclass, e.g. PiePlot3D or RingPlot) for the plot. The MultiplePiePlot will update the chart title and dataset just prior to drawing each subchart.

I will create a demo and write it up in the developer guide for the next release.
David Gilbert
JFreeChart Project Leader

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

Locked