RadarChart

live example

Explore the API in the live example.

api reference

RadarChart(name[, parent])
The radar chart widget. Being a chart, it extends the [Chart] ../components/chart.html component, with all of its available APIs. Each plot data is represented by a shape. Furthermore it extends the following components:
  • Highlight: Highlight one or more plots.
  • LineStyle: Using dashed or dotted lines for the plots.
  • LineWidth: Width of the plot lines.
  • Objects: You can add arbitrary SVG objects to the chart or insert a legend into it.
  • Opacity: Fill opacity of the plots.
  • RadialAxis: The axis used in the chart.
  • RadialAxis: The grid illustrating axis values.
  • Smoothing: Whether to use polygons or splines.

Parameters

NameTypeDescription
namestringName of the chart. Should be a unique identifier.
parentstringoptionalSee [Widget] ../components/widget.html for description. Default value is body.
RadarChart.dimensions([dimensions])
Sets the order of dimensions to show: they are positioned counter -clockwise. By default dimensions are read from the data and keys are sorted alphabetically.

Parameters

NameTypeDescription
dimensionsstring[]optionalArray representing the order of dimensions. If not specified, keys are read from data and sorted alphabetically. Default value is null.

Returns

Object
Reference to the ViolinPlot's API.

Examples

// Use a subset of dimensions.
const radar = dalian.RadarPlot('my-chart')
  .dimensions(['col1', 'col2'])
  .render()

// Reset radar to use all dimensions sorted alphabetically.
radar.dimensions()
  .render()
RadarChart.radius([radius])
Sets the radius in pixels.

Parameters

NameTypeDescription
radiusnumberoptionalRadius length to set. Default value is 100.

Returns

Object
Reference to the ViolinPlot's API.

Examples

// Set radius to 60 pixels.
const radar = dalian.RadarPlot('my-chart')
  .radius(60)
  .render()

// Reset radius to 100 pixels.
radar.radius()
  .render()