Radial Area Chart
The Ignite UI for Web Components 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 IgcRadialAreaSeriesComponent uses the same concepts of data plotting as the IgcAreaSeriesComponent but wraps data points around a circle rather than stretching them along a horizontal line.
Demo
Required Axes
The Web Components data chart component provides various types of axes but only the following types of axes can be used with IgcRadialAreaSeriesComponent.
Required Data
The IgcRadialAreaSeriesComponent 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
IgcRadialAreaSeriesComponent. - 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.IgcCategoryAngleAxisComponent). - All data items must contain at least one numeric data column which should be mapped using the
valueMemberPathproperty of theIgcRadialAreaSeriesComponent.
You can use the SampleRadialData as data source which meets above data requirements.
public dataSource: any[] = SampleRadialData.create();
Required Modules
Creation of the IgcRadialAreaSeriesComponent requires the following modules:
// module manager
import { ModuleManager } from 'igniteui-webcomponents-core';
// data chart's modules
import { IgcDataChartCoreModule } from 'igniteui-webcomponents-charts';
import { IgcDataChartInteractivityModule } from 'igniteui-webcomponents-charts';
import { IgcDataChartRadialCoreModule } from 'igniteui-webcomponents-charts';
import { IgcDataChartRadialModule } from 'igniteui-webcomponents-charts';
// axis' modules:
import { IgcCategoryAngleAxisModule } from 'igniteui-webcomponents-charts';
import { IgcNumericRadiusAxisModule } from 'igniteui-webcomponents-charts';
// axis' components
import { IgcCategoryAngleAxisComponent } from 'igniteui-webcomponents-charts';
import { IgcNumericRadiusAxisComponent } from 'igniteui-webcomponents-charts';
// series modules:
import { IgcRadialAreaSeriesModule } from 'igniteui-webcomponents-charts';
// series' components
import { IgcRadialAreaSeriesComponent } from 'igniteui-webcomponents-charts';
// data chart component
import { IgcDataChartComponent } from 'igniteui-webcomponents-charts';
// register the modules
ModuleManager.register(
IgcDataChartCoreModule,
IgcDataChartInteractivityModule,
IgcDataChartRadialCoreModule,
IgcDataChartRadialModule,
IgcRadialAreaSeriesModule
);
Code Example
This code demonstrates how to create an instance of the Ignite UI for Web Components data chart with IgcRadialAreaSeriesComponent and bind it to a data source.
<igc-data-chart id="chart"
width="700px"
height="500px">
<igc-category-angle-axis id="angleAxis" label="Department"></igc-category-angle-axis>
<igc-numeric-radius-axis id="radiusAxis"></igc-numeric-radius-axis>
<igc-radial-area-series
id="series1"
angle-axis="angleAxis"
value-axis="radiusAxis"
value-member-path="Budget">
</igc-radial-area-series>
</igc-data-chart>
let chart = (document.getElementById("chart") as IgcDataChartComponent);
chart.dataSource = data;