Radial Line Chart

The Ignite UI for Angular radial line chart belongs to a group of radial charts and is rendered using a collection of straight lines connecting data points. The IgxRadialLineSeriesComponent uses the same concepts of data plotting as the IgxLineSeriesComponent, but wraps data points around a circle rather than stretching them along a horizontal line.

Demo

Required Axes

The Angular data chart component provides various types of axes but only the following types of axes can be used with IgxRadialLineSeriesComponent.

Required Data

The IgxRadialLineSeriesComponent 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 IgxRadialLineSeriesComponent.
  • All data items must contain at least one label data column (string or date time) which should be mapped to the Label property of the category axis (e.g. IgxCategoryAngleAxisComponent).
  • All data items must contain at least one numeric data column which should be mapped using the valueMemberPath property of the IgxRadialLineSeriesComponent.

You can use the SampleRadialData as data source which meets above data requirements.

this.state = { dataSource: SampleRadialData.create() }

Required Modules

Creation of the IgxRadialLineSeriesComponent requires the following modules:

// axis' modules:
import { IgxCategoryAngleAxis } from "igniteui-angular-charts/ES5/igx-category-angle-axis";
import { IgxNumericRadiusAxis } from "igniteui-angular-charts/ES5/igx-numeric-radius-axis";
// series modules:
import { IgxRadialLineSeries } from "igniteui-angular-charts/ES5/igx-radial-line-series";
// data chart's modules:

import { IgxDataChartCoreModule } from "igniteui-angular-charts/ES5/igx-data-chart-core-module";
import { IgxDataChartRadialCoreModule } from "igniteui-angular-charts/ES5/igx-data-chart-radial-core-module";
import { IgxDataChartRadialModule } from "igniteui-angular-charts/ES5/igx-data-chart-radial-module";

@NgModule({
    imports: [
        // ...
        IgxDataChartCoreModule,
        IgxDataChartRadialCoreModule,
        IgxDataChartRadialModule,
        // ...
    ]
})

Code Example - Radial Line Chart

This code demonstrates how to create an instance of the Ignite UI for Angular data chart with IgxRadialLineSeriesComponent and bind it to a data source.

 <igx-data-chart
    [dataSource]="dataSource"
    width="700px"
    height="500px">
    <igx-category-angle-axis name="angleAxis" label="Department"></igx-category-angle-axis>
    <igx-numeric-radius-axis name="radiusAxis"></igx-numeric-radius-axis>
    <igx-radial-line-series
        name="series1"
        valueMemberPath="Budget"
        valueAxisName="radiusAxis"
        angleAxisName="angleAxis">
    </igx-radial-line-series>
 </igx-data-chart>

Additional Resources