Polar Scatter Chart

The Ignite UI for React polar scatter chart belongs to a group of polar charts and is rendered using markers at the locations of data points without connecting lines. The IgrPolarScatterSeries uses the same concepts of data plotting as the IgrScatterSeries but wraps data points around a circle rather than stretching them along a horizontal line. Like with other series types, multiple IgrPolarScatterSeries can be plotted in the same data chart and they can overlay each other to show 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 IgrPolarScatterSeries.

Required Data

The IgrPolarScatterSeries 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 IgrPolarScatterSeries requires the following modules:

// axis' modules:
import { IgrNumericAngleAxis } from 'igniteui-react-charts';
import { IgrNumericRadiusAxis } from 'igniteui-react-charts';
// series modules:
import { IgrPolarScatterSeries } 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 IgrPolarScatterSeries and bind it to a data source.

<IgrDataChart
    dataSource={this.state.dataSource}
    width="700px"
    height="500px">
    <IgrNumericAngleAxis  name="angleAxis" startAngleOffset={-90} />
    <IgrNumericRadiusAxis name="radiusAxis" />
    <IgrPolarScatterSeries
        name="series1"
        angleMemberPath="Direction"
        radiusMemberPath="WindSpeed"
        radiusAxisName="radiusAxis"
        angleAxisName="angleAxis" />
</IgrDataChart>
const series1 = new IgrPolarScatterSeries({ 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