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
Name | Type | Description |
---|---|---|
inner | number | optionalRelative 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
Name | Type | Description |
---|---|---|
dimensions | string[] | 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:
- Highlight: Highlight one or more plots.
- LineStyle: Using dashed or dotted lines for the plots.
- LineWidth: Width of the plot lines.
- 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
Name | Type | Description |
---|---|---|
name | string | Name of the chart. Should be a unique identifier. |
parent | string | optionalSee [Widget] ../components/widget.html for description. Default value is body . |
StellarChart.radius([radius])
Sets the radius in pixels.
Parameters
Name | Type | Description |
---|---|---|
radius | number | optionalRadius 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()