Range Column Chart

The Ignite UI for React range column chart belongs to a group of range charts and is rendered using two lines with the area between the lines filled in. This type of series emphasizes the amount of change between low values and high values in the same data point over a period of time or compares multiple items. Range values are represented on the y-axis and categories are displayed on the x-axis. The IgrRangeColumnSeries is identical to the IgrRangeAreaSeries in all aspects except that the ranges are represented as filled area rather than a set of vertical columns.

Demo

Required Axes

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

Required Data

The IgrRangeColumnSeries 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 IgrRangeColumnSeries.
  • 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. IgrCategoryXAxis).
  • All data items must contain at least two numeric data column which should be mapped using the HighMemberPath and LowMemberPath properties of the IgrRangeColumnSeries.

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

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

Required Modules

Creation of the IgrRangeColumnSeries requires the following modules:

import { IgrNumericYAxis } from 'igniteui-react-charts';
import { IgrCategoryXAxis } from 'igniteui-react-charts';
import { IgrRangeColumnSeries } from 'igniteui-react-charts';
import { IgrDataChart } from 'igniteui-react-charts';
import { IgrDataChartCoreModule } from 'igniteui-react-charts';
import { IgrDataChartCategoryModule } from 'igniteui-react-charts';

IgrDataChartCoreModule.register();
IgrDataChartCategoryModule.register();

Code Example

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

 <IgrDataChart
    dataSource={this.state.dataSource}
    width="700px"
    height="500px">
    {/* axes */}
    <IgrCategoryXAxis name="xAxis" label="Year" />
    <IgrNumericYAxis  name="yAxis" />
    {/* series: */}
    <IgrRangeColumnSeries
        name="series1"
        xAxisName="xAxis"
        yAxisName="yAxis"
        highMemberPath="High"
        lowMemberPath="Low" />
 </IgrDataChart>
const series1 = new IgrRangeColumnSeries({ name: "series1" });
series1.highMemberPath = "High";
series1.lowMemberPath  = "Low";
series1.xAxisName = "xAxis";
series1.yAxisName = "yAxis";

const xAxis = new IgrNumericXAxis({  name: "xAxis" });
const yAxis = new IgrCategoryYAxis({ name: "yAxis" });
yAxis.label = "Year";

this.chart = new IgrDataChart({ name: "chart" });
this.chart.dataSource = SampleRangeData.create();
this.chart.axes.add(yAxis);
this.chart.axes.add(xAxis);
this.chart.series.add(series1);

Additional Resources