App.component.html:
// add your additional code here
<e-series-collection>
<e-series
*ngFor="let chart of data; let i = index"
[dataSource]="data[i]"
type="Column"
xName="x"
yName="y"
width="2"
[marker]="marker"
>
</e-series>
// add your additional code here
<button ejs-button cssClass="e-info" (click)="onChange($event)" style="text-transform:none !important" > Data Change </button>
App.component.ts:
// add your additional code here
public data: any = [
[{ x: 1, y: 2 }, { x: 2, y: 3 }],
[{ x: 1, y: 2 }, { x: 2, y: 3 }]
];
public onChange(e: Event): void {
this.data = [
[{ x: 1, y: 2 }, { x: 2, y: 3 }],
[{ x: 1, y: 2 }, { x: 2, y: 3 }],
[{ x: 1, y: 2 }, { x: 2, y: 3 }],
[{ x: 1, y: 2 }, { x: 2, y: 3 }]
];
}
// add your additional code here |
App.component.ts
import { L10n} from '@syncfusion/ej2-base';
L10n.load({
'en-US': {
grid: {
Add: 'Insert', // here you can customize the text as per your requirement.
Delete: 'Remove',
Cancel: "Discard"
}
}
});
@Component({
selector: 'app-root',
templateUrl: 'app.component.html',
providers: [ToolbarService, EditService, PageService]
})
. . .
} |
App.component.html
<ejs-grid [dataSource]='data' allowPaging='true' [pageSettings]='pageSettings' [editSettings]='editSettings' [toolbar]='toolbar'>
. . .
</ejs-grid> |