Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143027 | Mar 1,2019 03:34 AM UTC | Mar 1,2019 09:34 AM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Chart |
<ejs-chart (pointMove)='pointMove($event)'></ejs-chart>
public pointMove(args: IPointEventArgs): void {
alert(args.point.index)
}
|
[line.html]
<ejs-chart (load)='load($event)'>
Initializing the annotation
<e-annotations>
<e-annotation>
<ng-template #content></ng-template>
</e-annotation>
</e-annotations>
</ejs-chart>
[line.component.ts]
public load(args: ILoadedEventArgs): void {
let highInterval: number = 2;
//Other configurations
let annotationCollection: Object = [];
let dataSource: Object = args.chart.series[0].dataSource;
//Assigning annotation with empty array
args.chart.annotations = [];
for(let i=0; i< dataSource.length;i++){
args.chart.annotations.push({
x: new Date(dataSource[i].y),
y: dataSource[i].x + highInterval ,
coordinateUnits: 'Point',
region:'Series',
content : '<div id="chart_annotation">High</div>'
})
Other configurations
};
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.