Package org.jfree.chart.plot
Class MultiplePiePlot
java.lang.Object
org.jfree.chart.plot.Plot
org.jfree.chart.plot.MultiplePiePlot
- All Implemented Interfaces:
Serializable,Cloneable,EventListener,AxisChangeListener,DatasetChangeListener
public class MultiplePiePlot extends Plot implements Cloneable, Serializable
A plot that displays multiple pie plots using data from a
CategoryDataset.- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class org.jfree.chart.plot.Plot
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO -
Constructor Summary
Constructors Constructor Description MultiplePiePlot()Creates a new plot with no data.MultiplePiePlot(CategoryDataset dataset)Creates a new plot. -
Method Summary
Modifier and Type Method Description voiddraw(Graphics2D g2, Rectangle2D plotArea, PlotState parentState, PlotRenderingInfo info)Draws the plot on a Java 2D graphics device (such as the screen or a printer).org.jfree.util.TableOrdergetDataExtractOrder()Returns the data extract order (by row or by column).LegendItemCollectiongetLegendItems()Returns a collection of legend items for the pie chart.doublegetLimit()Returns the limit (as a percentage) below which small pie sections are aggregated.JFreeChartgetPieChart()Returns the pie chart that is used to draw the individual pie plots.StringgetPlotType()Returns a short string describing the type of plot.voidsetDataExtractOrder(org.jfree.util.TableOrder order)Sets the data extract order (by row or by column) and sends aPlotChangeEventto all registered listeners.voidsetLimit(double limit)Sets the limit below which pie sections are aggregated.voidsetPieChart(JFreeChart pieChart)Sets the chart that is used to draw the individual pie plots.voidsetSumScale(boolean useSizeScaling)Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, axisChanged, clone, datasetChanged, draw, drawBackground, drawOutline, equals, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundPaint, getDataAreaRatio, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRootPlot, handleClick, isPlotShowing, isSubplot, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundPaint, setDataAreaRatio, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setParent, setPlotShowing, zoom
-
Constructor Details
-
MultiplePiePlot
public MultiplePiePlot()Creates a new plot with no data. -
MultiplePiePlot
Creates a new plot.- Parameters:
dataset- the dataset (nullpermitted).
-
-
Method Details
-
getPieChart
Returns the pie chart that is used to draw the individual pie plots.- Returns:
- the pie chart.
-
setPieChart
Sets the chart that is used to draw the individual pie plots.- Parameters:
pieChart- the pie chart.
-
getDataExtractOrder
public org.jfree.util.TableOrder getDataExtractOrder()Returns the data extract order (by row or by column).- Returns:
- the data extract order (never
null).
-
setDataExtractOrder
public void setDataExtractOrder(org.jfree.util.TableOrder order)Sets the data extract order (by row or by column) and sends aPlotChangeEventto all registered listeners.- Parameters:
order- the order (nullnot permitted).
-
getLimit
public double getLimit()Returns the limit (as a percentage) below which small pie sections are aggregated.- Returns:
- The limit percentage.
-
setLimit
public void setLimit(double limit)Sets the limit below which pie sections are aggregated. Set this to 0.0 if you don't want any aggregation to occur.- Parameters:
limit- the limit percent.
-
getPlotType
Returns a short string describing the type of plot.- Specified by:
getPlotTypein classPlot- Returns:
- the plot type.
-
setSumScale
public void setSumScale(boolean useSizeScaling) -
draw
public void draw(Graphics2D g2, Rectangle2D plotArea, PlotState parentState, PlotRenderingInfo info)Draws the plot on a Java 2D graphics device (such as the screen or a printer). -
getLegendItems
Returns a collection of legend items for the pie chart.- Overrides:
getLegendItemsin classPlot- Returns:
- the legend items.
-