public class RadarChart

  1. Object
  2. AbstractChart
  3. RoundChart
  4. RadarChart

Draws multi-dimensional data as a web chart (also known as a radar or spider chart).

The chart consumes an AreaSeries where each category represents an axis radiating from the centre. Configure colours and labelling through a DefaultRenderer and wrap the instance in a com.codename1.charts.ChartComponent to present it inside your UI.

Constructors

public RadarChart(AreaSeries dataset, DefaultRenderer renderer)Builds a new radar chart instance.

Methods

public void draw(Canvas canvas, int x, int y, int width, int height, Paint paint)The graphical representation of the radar chart.
public int getLegendShapeWidth(int seriesIndex)Returns the legend shape width.
public void drawLegendShape(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint)The graphical representation of the legend shape.

Inherited fields

Inherited methods

Constructor details

RadarChart

public RadarChart(AreaSeries dataset, DefaultRenderer renderer)
Builds a new radar chart instance.

Parameters

dataset AreaSeries
the series dataset
renderer DefaultRenderer
the series renderer

Method details

draw

public void draw(Canvas canvas, int x, int y, int width, int height, Paint paint)
The graphical representation of the radar chart.

Parameters

canvas Canvas
the canvas to paint to
x int
the top left x value of the view to draw to
y int
the top left y value of the view to draw to
width int
the width of the view to draw to
height int
the height of the view to draw to
paint Paint
the paint

getLegendShapeWidth

public int getLegendShapeWidth(int seriesIndex)
Returns the legend shape width.

Parameters

seriesIndex int
the series index

Returns

the legend shape width

drawLegendShape

public void drawLegendShape(Canvas canvas, SimpleSeriesRenderer renderer, float x, float y, int seriesIndex, Paint paint)
The graphical representation of the legend shape.

Parameters

canvas Canvas
the canvas to paint to
renderer SimpleSeriesRenderer
the series renderer
x float
the x value of the point the shape should be drawn at
y float
the y value of the point the shape should be drawn at
seriesIndex int
the series index
paint Paint
the paint to be used for drawing