Range Column Chart
The Ignite UI for Web Components 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 IgcRangeColumnSeriesComponent is identical to the IgcRangeAreaSeriesComponent in all aspects except that the ranges are represented as filled area rather than a set of vertical columns.
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 IgcRangeColumnSeriesComponent:
IgcCategoryXAxisComponentIgcOrdinalTimeXAxisComponentIgcTimeXAxisComponentIgcNumericYAxisComponent
Required Data
The IgcRangeColumnSeriesComponent 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
IgcRangeColumnSeriesComponent. - All data items must contain at least one label data column (string or date time) which should be mapped to the
Labelproperty of the category axis (e.g.IgcCategoryXAxisComponent). - All data items must contain at least two numeric data column which should be mapped using the
HighMemberPathandLowMemberPathproperties of theIgcRangeColumnSeriesComponent.
You can use the SampleRangeData as data source which meets above data requirements.
public dataSource: any[] = SampleRangeData.create();
Required Modules
Creation of the IgcRangeColumnSeriesComponent requires the following modules:
import { IgcDataChartComponent } from 'igniteui-webcomponents-charts';
import { IgcDataChartCoreModule } from 'igniteui-webcomponents-charts';
import { IgcDataChartCategoryCoreModule } from 'igniteui-webcomponents-charts';
import { IgcDataChartCategoryModule } from 'igniteui-webcomponents-charts';
import { IgcDataChartInteractivityModule } from 'igniteui-webcomponents-charts';
import { IgcRangeColumnSeriesModule } from 'igniteui-webcomponents-charts';
import { ModuleManager } from 'igniteui-webcomponents-core';
ModuleManager.register(
IgcDataChartCoreModule,
IgcDataChartCategoryCoreModule,
IgcDataChartCategoryModule,
IgcDataChartInteractivityModule,
IgcRangeColumnSeriesModule
);
Code Example
This code demonstrates how to create an instance of the Ignite UI for Web Components data chart with IgcRangeColumnSeriesComponent and bind it to a data source.
<igc-data-chart id="chart"
width="700px"
height="500px">
<igc-category-x-axis id="xAxis" label="Year"></igc-category-x-axis>
<igc-numeric-y-axis id="yAxis"></igc-numeric-y-axis>
<igc-range-column-series
id="series1"
x-axis-name="xAxis"
y-axis-name="yAxis"
high-member-path="High"
low-member-path="Low">
</igc-range-column-series>
</igc-data-chart>
let chart = (document.getElementById("chart") as IgcDataChartComponent);
chart.dataSource = data;