Radial Pie Chart

The Ignite UI for Web Components radial pie chart belongs to a group of radial charts and uses pie slices that extend from the center of chart towards locations of data points. The IgcRadialPieSeriesComponent take concepts of categorizing multiple series of data points and wrapping them around on a circle rather than stretching data points 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 IgcRadialPieSeriesComponent.

Required Data

The IgcRadialPieSeriesComponent 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 IgcRadialPieSeriesComponent.
  • 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. IgcCategoryAngleAxisComponent).
  • All data items must contain at least one numeric data column which should be mapped using the valueMemberPath property of the IgcRadialPieSeriesComponent.

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

public dataSource: any[] = SampleRadialData.create();

Required Modules

Creation of the IgcRadialPieSeriesComponent 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 { IgcRadialPieSeriesModule } from 'igniteui-webcomponents-charts';
// series' components
import { IgcRadialPieSeriesComponent } from 'igniteui-webcomponents-charts';
// data chart component
import { IgcDataChartComponent } from 'igniteui-webcomponents-charts';

// register the modules
ModuleManager.register(
    IgcDataChartCoreModule,
    IgcDataChartInteractivityModule,
    IgcDataChartRadialCoreModule,
    IgcDataChartRadialModule,
    IgcRadialPieSeriesModule
);

Code Example

This code demonstrates how to create an instance of the Ignite UI for Web Components data chart with IgcRadialPieSeriesComponent 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-pie-series
        id="series1"
        angle-axis="angleAxis"
        value-axis="radiusAxis"
        value-member-path="Budget">
    </igc-radial-pie-series>
 </igc-data-chart>
let chart = (document.getElementById("chart") as IgcDataChartComponent);
chart.dataSource = data;

Additional Resources