org.jfree.chart.plot
public class SpiderWebPlot extends Plot implements Cloneable, Serializable
Field Summary | |
---|---|
static double | DEFAULT_AXIS_LABEL_GAP The default axis label gap (currently 10%). |
static double | DEFAULT_HEAD The default head radius percent (currently 1%). |
static double | DEFAULT_INTERIOR_GAP The default interior gap. |
static Paint | DEFAULT_LABEL_BACKGROUND_PAINT The default series label background paint. |
static Font | DEFAULT_LABEL_FONT The default series label font. |
static Paint | DEFAULT_LABEL_OUTLINE_PAINT The default series label outline paint. |
static Stroke | DEFAULT_LABEL_OUTLINE_STROKE The default series label outline stroke. |
static Paint | DEFAULT_LABEL_PAINT The default series label paint. |
static Paint | DEFAULT_LABEL_SHADOW_PAINT The default series label shadow paint. |
static double | DEFAULT_MAX_VALUE
The default maximum value plotted - forces the plot to evaluate
the maximum from the data passed in |
static double | DEFAULT_START_ANGLE The default starting angle for the radar chart axes. |
protected double | headPercent The head radius as a percentage of the available drawing area. |
static double | MAX_INTERIOR_GAP The maximum interior gap (currently 40%). |
Constructor Summary | |
---|---|
SpiderWebPlot()
Creates a default plot with no dataset. | |
SpiderWebPlot(CategoryDataset dataset)
Creates a new spider web plot with the given dataset, with each row
representing a series.
| |
SpiderWebPlot(CategoryDataset dataset, TableOrder extract)
Creates a new spider web plot with the given dataset.
|
Method Summary | |
---|---|
protected Point2D | calculateLabelLocation(Rectangle2D labelBounds, double ascent, Rectangle2D plotArea, double startAngle)
Returns the location for a label
|
Object | clone()
Returns a clone of this plot.
|
void | draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
|
protected void | drawLabel(Graphics2D g2, Rectangle2D plotArea, double value, int cat, double startAngle, double extent)
Draws the label for one axis.
|
protected void | drawRadarPoly(Graphics2D g2, Rectangle2D plotArea, Point2D centre, PlotRenderingInfo info, int series, int catCount, double headH, double headW)
Draws a radar plot polygon.
|
boolean | equals(Object obj)
Tests this plot for equality with an arbitrary object.
|
double | getAxisLabelGap()
Returns the axis label gap.
|
Paint | getAxisLinePaint()
Returns the paint used to draw the axis lines.
|
Stroke | getAxisLineStroke()
Returns the stroke used to draw the axis lines.
|
Paint | getBaseSeriesOutlinePaint()
Returns the base series paint. |
Stroke | getBaseSeriesOutlineStroke()
Returns the base series stroke. |
Paint | getBaseSeriesPaint()
Returns the base series paint. |
TableOrder | getDataExtractOrder()
Returns the data extract order (by row or by column).
|
CategoryDataset | getDataset()
Returns the dataset.
|
Rotation | getDirection()
Returns the direction in which the radar axes are drawn
(clockwise or anti-clockwise).
|
double | getHeadPercent()
Returns the head percent.
|
double | getInteriorGap()
Returns the interior gap, measured as a percentage of the available
drawing space.
|
Font | getLabelFont()
Returns the series label font.
|
CategoryItemLabelGenerator | getLabelGenerator()
Returns the label generator.
|
Paint | getLabelPaint()
Returns the series label paint.
|
LegendItemCollection | getLegendItems()
Returns a collection of legend items for the radar chart.
|
Shape | getLegendItemShape()
Returns the shape used for legend items.
|
double | getMaxValue()
Returns the maximum value any category axis can take.
|
String | getPlotType()
Returns a short string describing the type of plot.
|
protected Number | getPlotValue(int series, int cat)
Returns the value to be plotted at the interseries of the
series and the category. |
Paint | getSeriesOutlinePaint()
Returns the outline paint for ALL series in the plot.
|
Paint | getSeriesOutlinePaint(int series)
Returns the paint for the specified series.
|
Stroke | getSeriesOutlineStroke()
Returns the outline stroke for ALL series in the plot.
|
Stroke | getSeriesOutlineStroke(int series)
Returns the stroke for the specified series.
|
Paint | getSeriesPaint()
Returns the paint for ALL series in the plot.
|
Paint | getSeriesPaint(int series)
Returns the paint for the specified series.
|
double | getStartAngle()
Returns the start angle for the first radar axis.
|
CategoryToolTipGenerator | getToolTipGenerator()
Returns the tool tip generator for the plot.
|
CategoryURLGenerator | getURLGenerator()
Returns the URL generator for the plot.
|
protected Point2D | getWebPoint(Rectangle2D bounds, double angle, double length)
Returns a cartesian point from a polar angle, length and bounding box
|
boolean | isWebFilled()
Method to determine if the web chart is to be filled.
|
void | setAxisLabelGap(double gap)
Sets the axis label gap and sends a PlotChangeEvent to all
registered listeners.
|
void | setAxisLinePaint(Paint paint)
Sets the paint used to draw the axis lines and sends a
PlotChangeEvent to all registered listeners.
|
void | setAxisLineStroke(Stroke stroke)
Sets the stroke used to draw the axis lines and sends a
PlotChangeEvent to all registered listeners.
|
void | setBaseSeriesOutlinePaint(Paint paint)
Sets the base series paint.
|
void | setBaseSeriesOutlineStroke(Stroke stroke)
Sets the base series stroke.
|
void | setBaseSeriesPaint(Paint paint)
Sets the base series paint.
|
void | setDataExtractOrder(TableOrder order)
Sets the data extract order (by row or by column) and sends a
PlotChangeEventto all registered listeners.
|
void | setDataset(CategoryDataset dataset)
Sets the dataset used by the plot and sends a PlotChangeEvent
to all registered listeners.
|
void | setDirection(Rotation direction)
Sets the direction in which the radar axes are drawn and sends a
PlotChangeEvent to all registered listeners.
|
void | setHeadPercent(double percent)
Sets the head percent and sends a PlotChangeEvent to all
registered listeners.
|
void | setInteriorGap(double percent)
Sets the interior gap and sends a PlotChangeEvent to all
registered listeners. |
void | setLabelFont(Font font)
Sets the series label font and sends a PlotChangeEvent to all
registered listeners.
|
void | setLabelGenerator(CategoryItemLabelGenerator generator)
Sets the label generator and sends a PlotChangeEvent to all
registered listeners.
|
void | setLabelPaint(Paint paint)
Sets the series label paint and sends a PlotChangeEvent to all
registered listeners.
|
void | setLegendItemShape(Shape shape)
Sets the shape used for legend items and sends a PlotChangeEvent
to all registered listeners.
|
void | setMaxValue(double value)
Sets the maximum value any category axis can take and sends
a PlotChangeEvent to all registered listeners.
|
void | setSeriesOutlinePaint(Paint paint)
Sets the outline paint for ALL series in the plot. |
void | setSeriesOutlinePaint(int series, Paint paint)
Sets the paint used to fill a series of the radar and sends a
PlotChangeEvent to all registered listeners.
|
void | setSeriesOutlineStroke(Stroke stroke)
Sets the outline stroke for ALL series in the plot. |
void | setSeriesOutlineStroke(int series, Stroke stroke)
Sets the stroke used to fill a series of the radar and sends a
PlotChangeEvent to all registered listeners.
|
void | setSeriesPaint(Paint paint)
Sets the paint for ALL series in the plot. |
void | setSeriesPaint(int series, Paint paint)
Sets the paint used to fill a series of the radar and sends a
PlotChangeEvent to all registered listeners.
|
void | setStartAngle(double angle)
Sets the starting angle and sends a PlotChangeEvent to all
registered listeners.
|
void | setToolTipGenerator(CategoryToolTipGenerator generator)
Sets the tool tip generator for the plot and sends a
PlotChangeEvent to all registered listeners.
|
void | setURLGenerator(CategoryURLGenerator generator)
Sets the URL generator for the plot and sends a
PlotChangeEvent to all registered listeners.
|
void | setWebFilled(boolean flag)
Sets the webFilled flag and sends a PlotChangeEvent to all
registered listeners.
|
Parameters: dataset the dataset (null
permitted).
Parameters: dataset the dataset. extract controls how data is extracted (TableOrder#BY_ROW or TableOrder#BY_COLUMN).
Parameters: labelBounds the label bounds. ascent the ascent (height of font). plotArea the plot area startAngle the start angle for the pie series.
Returns: The location for a label.
Returns: A clone of this plot.
Throws: CloneNotSupportedException if the plot cannot be cloned for any reason.
Parameters: g2 the graphics device. area the area within which the plot should be drawn. anchor the anchor point (null
permitted). parentState the state from the parent plot, if there is one. info collects info about the drawing.
Parameters: g2 the graphics device. plotArea the plot area value the value of the label (ignored). cat the category (zero-based index). startAngle the starting angle. extent the extent of the arc.
Parameters: g2 the graphics device. plotArea the area we are plotting in (already adjusted). centre the centre point of the radar axes info chart rendering info. series the series within the dataset we are plotting catCount the number of categories per radar plot headH the data point height headW the data point width
Parameters: obj the object (null
permitted).
Returns: A boolean.
Returns: The axis label gap.
See Also: SpiderWebPlot
Returns: The paint used to draw the axis lines (never null
).
Since: 1.0.4
See Also: setAxisLinePaint getAxisLineStroke
Returns: The stroke used to draw the axis lines (never null
).
Since: 1.0.4
See Also: setAxisLineStroke getAxisLinePaint
Returns: The paint (never null
).
Returns: The stroke (never null
).
Returns: The paint (never null
).
See Also: setBaseSeriesPaint
Returns: The data extract order (never null
).
See Also: setDataExtractOrder
Returns: The dataset (possibly null
).
See Also: setDataset
Returns: The direction (never null
).
See Also: setDirection
Returns: The head percent.
See Also: SpiderWebPlot
Returns: The gap (as a percentage of the available drawing space).
See Also: SpiderWebPlot
Returns: The font (never null
).
See Also: setLabelFont
Returns: The label generator (never null
).
See Also: setLabelGenerator
Returns: The paint (never null
).
See Also: setLabelPaint
Returns: The legend items.
Returns: The shape (never null
).
See Also: setLegendItemShape
Returns: The maximum value.
See Also: SpiderWebPlot
Returns: The plot type.
BY_ROW
or BY_COLUMN
which basically is just
reversing the definition of the categories and data series being
plotted.
Parameters: series the series to be plotted. cat the category within the series to be plotted.
Returns: The value to be plotted (possibly null
).
See Also: getDataExtractOrder
Returns: The paint (possibly null
).
Parameters: series the series index (zero-based).
Returns: The paint (never null
).
Returns: The stroke (possibly null
).
Parameters: series the series index (zero-based).
Returns: The stroke (never null
).
Returns: The paint (possibly null
).
See Also: setSeriesPaint
Parameters: series the series index (zero-based).
Returns: The paint (never null
).
See Also: SpiderWebPlot
Returns: The start angle.
See Also: SpiderWebPlot
Returns: The tool tip generator (possibly null
).
Since: 1.0.2
Returns: The URL generator (possibly null
).
Since: 1.0.2
Parameters: bounds the area inside which the point needs to be. angle the polar angle, in degrees. length the relative length. Given in percent of maximum extend.
Returns: The cartesian point.
Returns: A boolean.
See Also: SpiderWebPlot
Parameters: gap the gap.
See Also: getAxisLabelGap
Parameters: paint the paint (null
not permitted).
Since: 1.0.4
See Also: getAxisLinePaint
Parameters: stroke the stroke (null
not permitted).
Since: 1.0.4
See Also: getAxisLineStroke
Parameters: paint the paint (null
not permitted).
Parameters: stroke the stroke (null
not permitted).
Parameters: paint the paint (null
not permitted).
See Also: getBaseSeriesPaint
Parameters: order the order (null
not permitted).
Throws: IllegalArgumentException if order
is
null
.
See Also: getDataExtractOrder
Parameters: dataset the dataset (null
permitted).
See Also: getDataset
Parameters: direction the direction (null
not permitted).
See Also: getDirection
Parameters: percent the percent.
See Also: getHeadPercent
Parameters: percent the gap (as a percentage of the available drawing space).
See Also: getInteriorGap
Parameters: font the font (null
not permitted).
See Also: getLabelFont
Parameters: generator the generator (null
not permitted).
See Also: getLabelGenerator
Parameters: paint the paint (null
not permitted).
See Also: getLabelPaint
Parameters: shape the shape (null
not permitted).
See Also: getLegendItemShape
Parameters: value the maximum value.
See Also: getMaxValue
Parameters: paint the paint (null
permitted).
Parameters: series the series index (zero-based). paint the paint (null
permitted).
Parameters: stroke the stroke (null
permitted).
Parameters: series the series index (zero-based). stroke the stroke (null
permitted).
Parameters: paint the paint (null
permitted).
See Also: getSeriesPaint
Parameters: series the series index (zero-based). paint the paint (null
permitted).
See Also: SpiderWebPlot
The initial default value is 90 degrees, which corresponds to 12 o'clock. A value of zero corresponds to 3 o'clock... this is the encoding used by Java's Arc2D class.
Parameters: angle the angle (in degrees).
See Also: getStartAngle
Parameters: generator the generator (null
permitted).
Since: 1.0.2
Parameters: generator the generator (null
permitted).
Since: 1.0.2
Parameters: flag the flag.
See Also: isWebFilled