Angular 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.
Data labels display information about data points. Add a template to display data labels with HTML elements such as images, DIV, and spans for more informative data labels. You can rotate a data label by its given angle.
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.
<ejs-chart style='display:block' id='chartcontainer' [primaryXAxis]='primaryXAxis'>
<e-series-collection>
<e-series [dataSource]='data' type='RangeArea' drawType= "Line" xName='x' high='high' low ='low'> </e-series>
</e-series-collection>
</ejs-chart>
//app.component.ts
import { Component } from '@angular/core';
export class AppComponent {
public data: Object[];
constructor () {
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 = {
x: new Date(2015, 0, i),
high: value, low: value - 10
};
series1.push(point1);
}
this.data = series1;
}
//Initializing Primary X Axis
public primaryXAxis: Object = {
valueType: 'DateTime',
};
}
//app.module.ts
import { ChartModule } from '@syncfusion/ej2-ng-charts';
import { RangeAreaSeriesService, DateTimeService} from '@syncfusion/ej2-ng-charts';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule, ChartModule
],
providers: [ RangeAreaSeriesService, DateTimeService],
bootstrap: [AppComponent]
})
export class AppModule { }