React Range Area charts are generally used to show the variation in the data value for a given time. Like area series, expect that the area between the high and low ranges is filled.
Marks data points with built-in shapes such as circles, rectangles, ellipses, vertical lines, horizontal lines, diamonds, triangles, and pentagons. In addition to these shapes, use images to make the point more attractive.
Shows the information about the data point with data label. Add a template to display data labels with any HTML element such as images, DIV, and spans to make data more informative.
Handle the missed data elegantly with empty points support.
The Range Area chart can be transposed vertically to view the data in a different perspective.
Customize the color and border of the range area chart using built-in APIs.
Enable zooming and panning support when dealing with large amount of data to visualize the data point in any region.
import {AxisModel,ChartComponent, DateTime, Inject, RangeAreaSeries, SeriesCollectionDirective, SeriesDirective} from'@syncfusion/ej2-react-charts';
import * as React from 'react';
let series1: object[] = [];
let value: number = 35;
let point1: object;
for (let i: number = 1; i < 360; i++) {
if (Math.random() > .5) {
value += Math.random();
} else {
value -= Math.random();
}
point1 = {
high: value, low: value - 10,x: new Date(2015, 0, i),
};
series1.push(point1);
}
class App extends React.Component<{}, {}> {
public primaryXAxis: AxisModel = { valueType: 'DateTime'};
public render() {
return <ChartComponent id='charts' primaryXAxis={this.primaryXAxis}>
<Inject services={[DateTime,RangeAreaSeries]} />
<SeriesCollectionDirective>
<SeriesDirective dataSource={series1} xName='x' high='high' low='low' type='RangeArea'/>
</SeriesCollectionDirective>
</ChartComponent>
}
};
ReactDOM.render(
<App />,
document.getElementById('charts') as HTMLElement
);
<!DOCTYPE html>
<html>
<body>
<div id="charts"></div>
</body>
</html>