Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class RadarSeries
A radar (spider) chart: one polygon per series over a shared set of spokes. All radar series in a chart share the spokes of the first one and one radial scale.
Chart chart = new Chart();
String[] skills = {"Speed", "Power", "Range", "Defense", "Stamina"};
chart.addSeries(new RadarSeries("Alice", skills).setValues(8, 6, 7, 5, 9));
chart.addSeries(new RadarSeries("Bob", skills).setValues(5, 9, 4, 8, 6));
Constructors
public RadarSeries(String name, String... spokes) | Creates a radar series. |
Methods
Inherited methods
From Series
getName, setName, getColor, setColor, isVisible, setVisible, isSecondaryAxis, setSecondaryAxis, isShowValues, setShowValues, getValueFormatter, setValueFormatter, getChart, getXBounds, getXBoundsWithin, getYBounds, getSelectablePointCount, isPointCountFromLayout, paintLegendSymbol, getLegendEntryCount, getLegendEntryName, paintLegendEntrySymbol, isLegendEntryVisible, toggleLegendEntry, transitionEnded, formatValue, handleTap, attached, detached, dataChanged, repaintChart, getVisibilityFraction, isGap, lerp
Constructor details
RadarSeries
public RadarSeries(String name, String... spokes)Parameters
nameString- the series name
spokesString...- the name of each spoke; may be null on all but the first radar series
Method details
isCartesian
public boolean isCartesian()setValues
public RadarSeries setValues(double... v)Parameters
vdouble...- the values
Returns
getValue
public double getValue(int i)i.setFillAlpha
public RadarSeries setFillAlpha(float a)Parameters
afloat- 0 to 1
Returns
captureTransitionStart
protected void captureTransitionStart()captureEntryStart
protected void captureEntryStart()paint
public void paint(ChartContext ctx)Parameters
ctxChartContext- the current frame: graphics, plot area, axes and animation progress
getPointCount
public int getPointCount()getPoint
public ChartPoint getPoint(ChartContext ctx, int i)index for a shared tooltip, or null.hitTest
public ChartPoint hitTest(ChartContext ctx, int x, int y, int radius)Parameters
ctxChartContext- the frame the series was last painted in
xint- chart relative x
yint- chart relative y
radiusint- how far from the point a touch may land and still hit it
Returns
formatTooltip
public String formatTooltip(ChartContext ctx, ChartPoint p)Parameters
ctxChartContext- the last paint context
pChartPoint- the point
Returns
collectTableRows
public void collectTableRows(List<String[]> rows){series, item, value} row per point.
Used by Chart.toTable() and the chart’s accessibility text.Parameters
rowsList<String[]>- the list to append rows to