<ej-chart id="container" style="display:block;" (load)="onchartload($event)"
title.text="Account Ratings" [isResponsive]="true" size.height="600" chartArea.border.width="1"
primaryXAxis.rangePadding="Additional" primaryXAxis.labelRotation="45" primaryXAxis.title.text="Rating Date"
primaryYAxis.title.text="Self Rating"
[commonSeriesOptions.tooltip.visible]="true"
[commonSeriesOptions.marker.visible]="true"
[legend.visible]="true"
size.width="1000px">
<e-seriescollection>
<e-series type="spline" name="one" enableAnimation="true" xName="RateDate" [dataSource]="chartData" yName="Rating" fill="#69D2E7" tooltip.visible="true"
tooltip.format="#point.x# : #point.y# <br/>">
</e-series>
<e-series type="spline" name="two" enableAnimation="true" xName="RateDate" [dataSource]="chartData2" yName="Rating" fill="red" tooltip.visible="true"
tooltip.format="#point.x# : #point.y# <br/>">
</e-series>
</e-seriescollection>
</ej-chart>
[angular2 template]
<ej-chart id="container" style="display:block;" title.text="Sales Analysis" [isResponsive]="true"
size.height="600" chartArea.border.width="1" primaryXAxis.rangePadding="Additional" primaryXAxis.labelRotation="45" primaryXAxis.title.text="Days"
primaryYAxis.title.text="Sales in Millions" [legend.visible]="false" size.width="1000px" [commonSeriesOptions.marker.visible]="true" [commonSeriesOptions.marker.size]="{ width: 10, height:10 }">
</ej-chart>
|
[component]
export class ChartComponent {
series:any;
constructor() {
//Add series collection in typescript instead of templates
this.series = [{
marker: { visible: true,
//Customize the size of marker
size: { width: 10, height: 10 }
},
points: [{x:"Mon", y:20}, {x:"Tue", y:30}, {x:"Wed", y:25}, {x:"Thu", y:32}, {x:"Fri", y:23}]
}];
}
}
[angular2 template]
<ej-chart id="container" style="display:block;" title.text="Sales Analysis" [isResponsive]="true"
size.height="600" chartArea.border.width="1" primaryXAxis.rangePadding="Additional" primaryXAxis.labelRotation="45" primaryXAxis.title.text="Days"
primaryYAxis.title.text="Sales in Millions" [legend.visible]="false" size.width="1000px" [series]="series">
</ej-chart> |