Hi,
What is the suggested way to implement an equivalent of MultiplePieChart for a subclass of PiePlot, e.g. RingPlot? Should I just extend MultiplePieChart and alter it as needed or is there a better way to do this?
Thanks,
Tim
Multiple RingPlot approach
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
RingPlot is a subclass of PiePlot, so you can plug it into the multi pie chart with something like this:
Code: Select all
MultiplePiePlot plot = (MultiplePiePlot) chart.getPlot();
PiePlot p = new RingPlot(null);
p.setLabelGenerator(new StandardPieItemLabelGenerator("{0}"));
p.setLabelFont(new Font("SansSerif", Font.PLAIN, 8));
p.setInteriorGap(0.30);
JFreeChart subchart = new JFreeChart("Subchart", new Font("SansSerif", Font.BOLD, 14), p, false);
plot.setPieChart(subchart);
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Re: Multiple RingPlot approach
timw wrote:Hi,
What is the suggested way to implement an equivalent of MultiplePieChart for a
Thanks,
Tim