DEFAULT_AXIS_LABEL_GAP
public static final double DEFAULT_AXIS_LABEL_GAP
The default axis label gap (currently 10%).
DEFAULT_HEAD
public static final double DEFAULT_HEAD
The default head radius percent (currently 1%).
DEFAULT_LABEL_FONT
public static final Font DEFAULT_LABEL_FONT
The default series label font.
DEFAULT_LABEL_PAINT
public static final Paint DEFAULT_LABEL_PAINT
The default series label paint.
DEFAULT_MAX_VALUE
public static final double DEFAULT_MAX_VALUE
The default maximum value plotted - forces the plot to evaluate
the maximum from the data passed in
DEFAULT_START_ANGLE
public static final double DEFAULT_START_ANGLE
The default starting angle for the radar chart axes.
MAX_INTERIOR_GAP
public static final double MAX_INTERIOR_GAP
The maximum interior gap (currently 40%).
headPercent
protected double headPercent
The head radius as a percentage of the available drawing area.
calculateLabelLocation
protected Point2D calculateLabelLocation(Rectangle2D labelBounds,
double ascent,
Rectangle2D plotArea,
double startAngle)
Returns the location for a label
labelBounds
- the label bounds.ascent
- the ascent (height of font).plotArea
- the plot areastartAngle
- the start angle for the pie series.
- The location for a label.
draw
public 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).
- draw in interface Plot
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.
drawLabel
protected void drawLabel(Graphics2D g2,
Rectangle2D plotArea,
double value,
int cat,
double startAngle,
double extent)
Draws the label for one axis.
g2
- the graphics device.plotArea
- the plot areavalue
- the value of the label.cat
- the category (zero-based index).startAngle
- the starting angle.extent
- the extent of the arc.
drawRadarPoly
protected void drawRadarPoly(Graphics2D g2,
Rectangle2D plotArea,
Point2D centre,
PlotRenderingInfo info,
int series,
int catCount,
double headH,
double headW)
Draws a radar plot polygon.
g2
- the graphics device.plotArea
- the area we are plotting in (already adjusted).centre
- the centre point of the radar axesinfo
- chart rendering info.series
- the series within the dataset we are plottingcatCount
- the number of categories per radar plotheadH
- the data point heightheadW
- the data point width
equals
public boolean equals(Object obj)
Tests this plot for equality with an arbitrary object.
- equals in interface Plot
obj
- the object (null
permitted).
getBaseSeriesOutlinePaint
public Paint getBaseSeriesOutlinePaint()
Returns the base series paint. This is used when no other paint is
available.
getBaseSeriesOutlineStroke
public Stroke getBaseSeriesOutlineStroke()
Returns the base series stroke. This is used when no other stroke is
available.
getBaseSeriesPaint
public Paint getBaseSeriesPaint()
Returns the base series paint. This is used when no other paint is
available.
getDataExtractOrder
public TableOrder getDataExtractOrder()
Returns the data extract order (by row or by column).
- The data extract order (never
null
).
getDirection
public Rotation getDirection()
Returns the direction in which the radar axes are drawn
(clockwise or anti-clockwise).
- The direction (never
null
).
getHeadPercent
public double getHeadPercent()
Returns the head percent.
getInteriorGap
public double getInteriorGap()
Returns the interior gap, measured as a percentage of the available
drawing space.
- The gap (as a percentage of the available drawing space).
getLabelFont
public Font getLabelFont()
Returns the series label font.
getLabelPaint
public Paint getLabelPaint()
Returns the series label paint.
getLegendItemShape
public Shape getLegendItemShape()
Returns the shape used for legend items.
getMaxValue
public double getMaxValue()
Returns the maximum value any category axis can take.
getSeriesOutlinePaint
public Paint getSeriesOutlinePaint()
Returns the outline paint for ALL series in the plot.
- The paint (possibly
null
).
getSeriesOutlinePaint
public Paint getSeriesOutlinePaint(int series)
Returns the paint for the specified series.
series
- the series index (zero-based).
getSeriesOutlineStroke
public Stroke getSeriesOutlineStroke()
Returns the outline stroke for ALL series in the plot.
- The stroke (possibly
null
).
getSeriesOutlineStroke
public Stroke getSeriesOutlineStroke(int series)
Returns the stroke for the specified series.
series
- the series index (zero-based).
getSeriesPaint
public Paint getSeriesPaint()
Returns the paint for ALL series in the plot.
- The paint (possibly
null
).
getSeriesPaint
public Paint getSeriesPaint(int series)
Returns the paint for the specified series.
series
- the series index (zero-based).
getStartAngle
public double getStartAngle()
Returns the start angle for the first radar axis.
This is measured in degrees starting from 3 o'clock (Java Arc2D default)
and measuring anti-clockwise.
getWebPoint
protected Point2D getWebPoint(Rectangle2D bounds,
double angle,
double length)
Returns a cartesian point from a polar angle, length and bounding box
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.
isWebFilled
public boolean isWebFilled()
Method to determine if the web chart is to be filled.
setBaseSeriesOutlinePaint
public void setBaseSeriesOutlinePaint(Paint paint)
Sets the base series paint.
paint
- the paint (null
not permitted).
setBaseSeriesOutlineStroke
public void setBaseSeriesOutlineStroke(Stroke stroke)
Sets the base series stroke.
stroke
- the stroke (null
not permitted).
setBaseSeriesPaint
public void setBaseSeriesPaint(Paint paint)
Sets the base series paint.
paint
- the paint (null
not permitted).
setDataExtractOrder
public void setDataExtractOrder(TableOrder order)
Sets the data extract order (by row or by column) and sends a
PlotChangeEvent
to all registered listeners.
order
- the order (null
not permitted).
setDirection
public void setDirection(Rotation direction)
Sets the direction in which the radar axes are drawn and sends a
PlotChangeEvent
to all registered listeners.
direction
- the direction (null
not permitted).
setInteriorGap
public void setInteriorGap(double percent)
Sets the interior gap and sends a
PlotChangeEvent
to all
registered listeners. This controls the space between the edges of the
plot and the plot area itself (the region where the axis labels appear).
percent
- the gap (as a percentage of the available drawing space).
setLabelFont
public void setLabelFont(Font font)
Sets the series label font and sends a
PlotChangeEvent
to all
registered listeners.
font
- the font (null
not permitted).
setLabelPaint
public void setLabelPaint(Paint paint)
Sets the series label paint and sends a
PlotChangeEvent
to all
registered listeners.
paint
- the paint (null
not permitted).
setLegendItemShape
public void setLegendItemShape(Shape shape)
Sets the shape used for legend items.
shape
- the shape (null
not permitted).
setMaxValue
public void setMaxValue(double value)
Sets the maximum value any category axis can take and sends
a
PlotChangeEvent
to all registered listeners.
value
- the maximum value.
setSeriesOutlinePaint
public void setSeriesOutlinePaint(Paint paint)
Sets the outline paint for ALL series in the plot. If this is set to
null, then a list of paints is used instead (to allow
different colors to be used for each series).
paint
- the paint (null
permitted).
setSeriesOutlinePaint
public 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.
series
- the series index (zero-based).paint
- the paint (null
permitted).
setSeriesOutlineStroke
public void setSeriesOutlineStroke(Stroke stroke)
Sets the outline stroke for ALL series in the plot. If this is set to
null, then a list of paints is used instead (to allow
different colors to be used for each series).
stroke
- the stroke (null
permitted).
setSeriesOutlineStroke
public 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.
series
- the series index (zero-based).stroke
- the stroke (null
permitted).
setSeriesPaint
public void setSeriesPaint(Paint paint)
Sets the paint for ALL series in the plot. If this is set to null
, then a list of paints is used instead (to allow different colors
to be used for each series of the radar group).
paint
- the paint (null
permitted).
setSeriesPaint
public 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.
series
- the series index (zero-based).paint
- the paint (null
permitted).
setStartAngle
public void setStartAngle(double angle)
Sets the starting angle and sends a
PlotChangeEvent
to all
registered listeners.
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.
angle
- the angle (in degrees).