Hi Manoj,
As of now it is not possible to automatically change the series value. Hence we suggest you to modify the series value using chart instance and refresh the chart to overcome the reported scenario. Please find the sample, code snippet and screenshot below.
Code Snippet:
|
// add your additional code here
<div align="center">
<ejs-chart #chart [primaryXAxis]="primaryXAxis" [primaryYAxis]="primaryYAxis" [tooltip]="tooltip"
[legendSettings]="legend" (loaded)="loaded($event)">
<e-series-collection>
<e-series *ngFor="let chart of traces" [dataSource]="chart.readings" type="{{chart.type}}"
xName="{{chart.xName}}" yName="{{chart.yName}}" width="2" [name]="chart.sensorId" [marker]="chart.marker"
[emptyPointSettings]="emptyPoint" pointColorMapping="color">
</e-series>
</e-series-collection>
</ejs-chart>
</div>
<button ejs-button cssClass="e-info" (click)="onChange($event)" style="text-transform:none !important">
Data Change
</button>
// add your additional code here
public onChange(e: Event): void {
this.chart.series[0].type = 'Line';
this.chart.series[1].type = 'Line';
this.chart.refresh();
} |
Screenshot:
Default:
AfterChange:
Let us know if you have any concerns.
Regards,
Srihari M