Radial Area Chart
The Ignite UI for Angular radial area chart belongs to a group of radial charts and has a shape of a filled polygon that is bound by a collection of straight lines connecting data points. The IgxRadialAreaSeriesComponent uses the same concepts of data plotting as the IgxAreaSeriesComponent 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 IgxRadialAreaSeriesComponent.
Required Data
The IgxRadialAreaSeriesComponent 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
IgxRadialAreaSeriesComponent. - 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.IgxCategoryAngleAxisComponent). - All data items must contain at least one numeric data column which should be mapped using the
valueMemberPathproperty of theIgxRadialAreaSeriesComponent.
You can use the SampleRadialData as data source which meets above data requirements.
this.chart.dataSource = SampleRadialData.create();
Required Modules
Creation of the IgxRadialAreaSeriesComponent 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 { IgxRadialAreaSeries } from "igniteui-angular-charts/ES5/igx-radial-area-series";
import { IgxRadialLineSeries } from "igniteui-angular-charts/ES5/igx-radial-line-series";
import { IgxRadialPieSeries } from "igniteui-angular-charts/ES5/igx-radial-pie-series";
import { IgxRadialColumnSeries } from "igniteui-angular-charts/ES5/igx-radial-column-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 Area Series
This code demonstrates how to create an instance of the Ignite UI for Angular data chart with IgxRadialAreaSeriesComponent 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-area-series
name="series1"
valueMemberPath="Budget"
valueAxisName="radiusAxis"
angleAxisName="angleAxis">
</igx-radial-area-series>
</igx-data-chart>