|
this.orderColumns = [
{
field: 'Freight',
headerTemplate: `<div>
<span class="e-icons e-add"></span> Freight
</div>`,
width: 120,
format: 'C1',
textAlign: 'Right',
minWidth: 10
}
]; |
|
this.orderColumns = [
{
field: 'OrderDate',
headerTemplate: `<img style="height: 25px;" src= "../assets/calendarIcon.svg"/>`,
format: 'yMd',
width: 130,
}
] |
|
App.component.html:
<ejs-chart
style="display:block"
align="center"
id="chart"
[title]="title"
[primaryXAxis]="primaryXAxis"
[primaryYAxis]="primaryYAxis"
[tooltip]="tooltip"
(load)="load($event)"
(loaded)="loaded($event)"
[chartArea]="chartArea"
[width]="width"
[legendSettings]="legend"
>
<e-series-collection>
<e-series
[dataSource]="data"
type="MultiColoredLine"
xName="x"
yName="y"
name="Rainfall"
width="1.5"
[emptyPointSettings]="emptyPoint"
pointColorMapping="color"
>
</e-series>
</e-series-collection>
</ejs-chart>
App.component.ts:
// add your additional code here
public data: Object[] = [
{ x: new Date(2005, 0, 1), y: 21, color: "blue" },
{ x: new Date(2006, 0, 1), y: 24, color: "blue" },
{ x: new Date(2007, 0, 1), y: null, color: "red" },
{ x: new Date(2008, 0, 1), y: 38, color: "blue" },
{ x: new Date(2009, 0, 1), y: 54, color: "blue" },
{ x: new Date(2010, 0, 1), y: null, color: "red" },
{ x: new Date(2011, 0, 1), y: 70, color: "blue" }
];
public emptyPoint: Object = {
mode: "Average"
};
public loaded(args: ILoadedEventArgs): void {
for (var i = 0; i < args.chart.series[0].dataSource["length"]; i++) {
if (args.chart.series[0].dataSource[i].y == null) {
document
.getElementById("chart_Series_0_Point_" + i)
.setAttribute("stroke-dasharray", "5,5");
}
}
}
// add your additional code here
|