Polar Spline Area Chart

The Ignite UI for React polar spline area chart belongs to a group of polar charts and has a shape of a filled region enclosed by a collection of spline lines connecting data points which are located at the polar (angle/radius) coordinates. The IgrPolarSplineAreaSeries uses the same concepts of data plotting as the IgrScatterSplineSeries but wraps data points around a circle rather than stretching them along a horizontal line. Like with other series types, multiple IgrPolarSplineAreaSeries can be plotted in the same data chart and they can be overlaid on each other to show the differences and similarities between data sets.

Demo

Required Axes

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

Required Data

The IgrPolarSplineAreaSeries 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 (IgrNumericAngleAxis) and the concentric rings that surround the pole are gridlines of the radius axis (IgrNumericRadiusAxis)

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

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

Required Modules

Creation of the IgrPolarSplineAreaSeries requires the following modules:

// axis' modules:
import { IgrNumericAngleAxis } from 'igniteui-react-charts';
import { IgrNumericRadiusAxis } from 'igniteui-react-charts';
// series modules:
import { IgrPolarSplineAreaSeries } from 'igniteui-react-charts';
// data chart's modules:
import { IgrDataChart } from 'igniteui-react-charts';
import { IgrDataChartCoreModule } from 'igniteui-react-charts';
import { IgrDataChartPolarCoreModule } from 'igniteui-react-charts';
import { IgrDataChartPolarModule } from 'igniteui-react-charts';

// registering data chart's modules:
IgrDataChartCoreModule.register();
IgrDataChartPolarCoreModule.register();
IgrDataChartPolarModule.register();

Code Example

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

<IgrDataChart
    dataSource={this.state.dataSource}
    width="700px"
    height="500px">
    <IgrNumericAngleAxis  name="angleAxis" startAngleOffset={-90} />
    <IgrNumericRadiusAxis name="radiusAxis" />
    <IgrPolarSplineAreaSeries
        name="series1"
        angleMemberPath="Direction"
        radiusMemberPath="WindSpeed"
        radiusAxisName="radiusAxis"
        angleAxisName="angleAxis" />
</IgrDataChart>
const series1 = new IgrPolarSplineAreaSeries({ name: "series1" });
series1.angleMemberPath = "Direction";
series1.radiusMemberPath  = "WindSpeed";
series1.radiusAxisName = "radiusAxis";
series1.angleAxisName = "angleAxis";

const radiusAxis = new IgrNumericRadiusAxis({ name: "radiusAxis" });
const angleAxis = new IgrNumericAngleAxis({ name: "angleAxis" });

this.chart = new IgrDataChart({ name: "chart" });
this.chart.dataSource = SampleCategoryData.create();
this.chart.axes.add(radiusAxis);
this.chart.axes.add(angleAxis);
this.chart.series.add(series1);

Additional Resources