Class RadarChart


public class RadarChart extends RoundChart

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.

  • Constructor Details

    • RadarChart

      public RadarChart(AreaSeries dataset, DefaultRenderer renderer)

      Builds a new radar chart instance.

      Parameters
      • dataset: the series dataset

      • renderer: 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: the canvas to paint to

      • x: the top left x value of the view to draw to

      • y: the top left y value of the view to draw to

      • width: the width of the view to draw to

      • height: the height of the view to draw to

      • paint: the paint

      Specified by:
      draw in class AbstractChart
    • getLegendShapeWidth

      public int getLegendShapeWidth(int seriesIndex)

      Returns the legend shape width.

      Parameters
      • seriesIndex: the series index
      Returns

      the legend shape width

      Overrides:
      getLegendShapeWidth in class RoundChart
    • 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: the canvas to paint to

      • renderer: the series renderer

      • x: the x value of the point the shape should be drawn at

      • y: the y value of the point the shape should be drawn at

      • seriesIndex: the series index

      • paint: the paint to be used for drawing

      Overrides:
      drawLegendShape in class RoundChart