Multiple RingPlot approach

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

Multiple RingPlot approach

Post by timw » Wed Apr 13, 2005 2:08 pm

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

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 Apr 13, 2005 2:27 pm

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

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

Guest

Re: Multiple RingPlot approach

Post by Guest » Fri Apr 29, 2005 2:45 pm

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

Guest

Sorry ...

Post by Guest » Fri Apr 29, 2005 2:47 pm

:oops: Sorry, i was the one who posted the last message ..
Could anyone please erase these two messages please !!

Thanks !!

Locked