<ejs-accumulationchart id="pieChart">
<e-accumulation-series-collection>
Initialized the empty series
<e-accumulation-series></e-accumulation-series>
</e-accumulation-series-collection>
</ejs-accumulationchart>
function addSeries(args) {
var chart = document.getElementById('pieChart').ej2_instances[0];
var seriesData = { type: 'Pie', dataSource: [{ x: 'X1', y: 14 },
//...
], xName: 'x', yName: 'y'
};
Assign the properties to chart from your data source and refresh the chart
chart.series[0].dataSource = seriesData.dataSource;
//...
chart.refresh();
}
|