PiePlot Class

  • PiePlot class comes under the org.jfree.chart.plot package of JFreeChart library.
  • This class provides methods to create Pie Plots.
  • A plot that displays data in the form of a pie chart, using data from any class that implements the PieDataset interface.

Constructor:

ConstructorDescription
PiePlot( )It creates a new plot.
PiePlot(PieDataset dataset)It creates a plot that draws a pie chart for the specified dataset.

Method Summary:

MethodDescription
clearSectionOutlinePaints(boolean notify)This method clears the section outline paint settings for this plot and if requested, sends a PlotChangeEvent to all registered listeners.
clone( )This method returns a clone of the plot.
draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)This method draws the plot on a Java 2D graphics device (such as the screen or a printer).
drawItem(Graphics2D g2, int section, Rectangle2D dataArea, PiePlotState state, int currentPass)This method draws a single data item.
drawLabels(Graphics2D g2, List keys, double totalValue, Rectangle2D plotArea, Rectangle2D linkArea, PiePlotState state)This method draws the labels for the pie sections.
drawPie(Graphics2D g2, Rectangle2D plotArea, PlotRenderingInfo info)This method draws the pie.
drawSimpleLabels(Graphics2D g2, List keys, double totalValue, Rectangle2D plotArea, Rectangle2D pieArea, PiePlotState state)This method draws the pie section label in the simplest form.
equals(Object obj)This method tests this plot for equality with an arbitrary object.
getDataset( )This method returns the dataset.
getDirection( )This method returns the direction in which the pie sections are drawn (clockwise or anti-clockwise).
getPieIndex( )This method returns the pie index (this is used by the MultiplePiePlot class to track subplots).
getPlotType( )This method returns a short string describing the type of plot.

Next TopicPiePlot3D class