|
<ej-chart id="chartcontainer" size.width="600" size.height="450"> </ej-chart>
|
|
Angular:
[app.component.ts]
//Assign the required width to a public variable in typescript file
public width: string = '400';
[app.component.html]
//Assign the width to chart in html file
<ej-chart [size.width]="width">
</ej-chart>
|
|
<button (click)="resizeChart()">Chart Resize</button>
resizeChart() {
var chart = $("#container").ejChart("instance");
chart.model.size.width = window.outerWidth;
chart.redraw();
}
|