Radial Line Chart
The Ignite UI for React radial line chart belongs to a group of radial charts and is rendered using a collection of straight lines connecting data points. The IgrRadialLineSeries uses the same concepts of data plotting as the IgrLineSeries, but wraps data points around a circle rather than stretching them along a horizontal line.
Demo
Required Axes
The React data chart component provides various types of axes but only the following types of axes can be used with IgrRadialLineSeries.
Required Data
The IgrRadialLineSeries has the following data requirements:
- The data source must be an array or a list of data items.
- The data source must contain at least one data item otherwise the chart will not render the
IgrRadialLineSeries. - All data items must contain at least one label data column (string or date time) which should be mapped to the
Labelproperty of the category axis (e.g.IgrCategoryAngleAxis). - All data items must contain at least one numeric data column which should be mapped using the
valueMemberPathproperty of theIgrRadialLineSeries.
You can use the SampleRadialData as data source which meets above data requirements.
public dataSource: any[] = SampleRadialData.create();
Required Modules
Creation of the IgrRadialLineSeries requires the following modules:
// axis' modules:
import { IgrCategoryAngleAxis } from 'igniteui-react-charts';
import { IgrNumericRadiusAxis } from 'igniteui-react-charts';
// series modules:
import { IgrRadialLineSeries } from 'igniteui-react-charts';
// data chart's modules:
import { IgrDataChart } from 'igniteui-react-charts';
import { IgrDataChartCoreModule } from 'igniteui-react-charts';
import { IgrDataChartRadialCoreModule } from 'igniteui-react-charts';
import { IgrDataChartRadialModule } from 'igniteui-react-charts';
// registering data chart's modules:
IgrDataChartCoreModule.register();
IgrDataChartRadialCoreModule.register();
IgrDataChartRadialModule.register();
Code Example
This code demonstrates how to create an instance of the Ignite UI for React data chart with IgrRadialLineSeries and bind it to a data source.
<IgrDataChart
dataSource={this.state.dataSource}
width="700px"
height="500px">
<IgrCategoryAngleAxis name="angleAxis" label="Department" />
<IgrNumericRadiusAxis name="radiusAxis" />
<IgrRadialLineSeries
name="series1"
valueMemberPath="Budget"
valueAxisName="radiusAxis"
angleAxisName="angleAxis" />
</IgrDataChart>
const series1 = new IgrRadialLineSeries({ name: "series1" });
series1.valueMemberPath = "Budget";
series1.radiusAxisName = "radiusAxis";
series1.angleAxisName = "angleAxis";
const radiusAxis = new IgrNumericRadiusAxis({ name: "radiusAxis" });
const angleAxis = new IgrCategoryAngleAxis({ name: "angleAxis" });
angleAxis.label = "Department";
this.chart = new IgrDataChart({ name: "chart" });
this.chart.dataSource = SampleRadialData.create();
this.chart.axes.add(radiusAxis);
this.chart.axes.add(angleAxis);
this.chart.series.add(series1);