Polar Area Chart

The Ignite UI for Web Components polar area chart belongs to a group of polar charts and has a shape of a filled polygon which vertices or corners are located at the polar (angle/radius) coordinates of data points. The IgcPolarAreaSeriesComponent uses the same concepts of data plotting as the IgcScatterSeriesComponent but wraps data points around a circle rather than stretching them along a horizontal line. Like with other series types, multiple IgcPolarAreaSeriesComponent can be plotted in the same data chart and they can be overlaid on each other to show differences and similarities between data sets.

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 IgcPolarAreaSeriesComponent.

Required Data

The IgcPolarAreaSeriesComponent has the following data requirements:

In polar coordinate systems, the location of data points is determined by an angle (angular coordinate) from a fixed direction and distance (radial coordinate) from a fixed point (analogous to the origin of a Cartesian coordinate) which is called "the pole". The lines that start from the pole and point outwards are gridlines of the angular axis (IgcNumericAngleAxisComponent) and the concentric rings that surround the pole are gridlines of the radius axis (IgcNumericRadiusAxisComponent)

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

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

Required Modules

Creation of the IgcPolarAreaSeriesComponent 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 { IgcDataChartPolarCoreModule } from 'igniteui-webcomponents-charts';
import { IgcDataChartPolarModule } from 'igniteui-webcomponents-charts';
// axis' modules:
import { IgcNumericAngleAxisModule } from 'igniteui-webcomponents-charts';
import { IgcNumericRadiusAxisModule } from 'igniteui-webcomponents-charts';
// axis' components
import { IgcNumericAngleAxisComponent } from 'igniteui-webcomponents-charts';
import { IgcNumericRadiusAxisComponent } from 'igniteui-webcomponents-charts';
// series modules:
import { IgcPolarAreaSeriesModule } from 'igniteui-webcomponents-charts';
// series' components
import { IgcPolarAreaSeriesComponent } from 'igniteui-webcomponents-charts';
// data chart component
import { IgcDataChartComponent } from 'igniteui-webcomponents-charts';

// register the modules
ModuleManager.register(
    IgcDataChartCoreModule,
    IgcDataChartInteractivityModule,
    IgcDataChartPolarCoreModule,
    IgcDataChartPolarModule,
    IgcPolarAreaSeriesModule,
);

Code Example

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

<igc-data-chart id="chart"
    width="700px"
    height="500px">
    <igc-numeric-angle-axis  id="angleAxis" start-angle-offset="-90"></igc-numeric-angle-axis>
    <igc-numeric-radius-axis id="radiusAxis"></igc-numeric-radius-axis>
    <igc-polar-area-series
        id="series1"
        angle-axis="angleAxis"
        radius-axis="radiusAxis"
        angle-member-path="Direction"
        radius-member-path="WindSpeed">
    </igc-polar-area-series>
</igc-data-chart>
let chart = (document.getElementById("chart") as IgcDataChartComponent);
chart.dataSource = data;

Additional Resources