StellarChart

live example

Explore the API in the live example.

api reference

StellarChart.radius([inner])
Sets the inner radius relative to the axis range.

Parameters

NameTypeDescription
innernumberoptionalRelative radius length to set. Default value is 0.05.

Returns

Object
Reference to the StellarChart's API.

Examples

// Set inner radius to 0.08 of the maximum radius.
const stellar = dalian.StellarChart('my-chart')
  .inner(0.08)
  .render()

// Reset inner radius to 0.05 of the maximum radius.
stellar.inner()
  .render()
StellarChart.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 StellarChart's API.

Examples

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

// Reset radar to use all dimensions sorted alphabetically.
stellar.dimensions()
  .render()
StellarChart.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:

Parameters

NameTypeDescription
namestringName of the chart. Should be a unique identifier.
parentstringoptionalSee [Widget] ../components/widget.html for description. Default value is body.
StellarChart.radius([radius])
Sets the radius in pixels.

Parameters

NameTypeDescription
radiusnumberoptionalRadius length to set. Default value is 100.

Returns

Object
Reference to the StellarChart's API.

Examples

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

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