We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Add series to Accumlation Pie Chart

Thread ID:





143332 Mar 14,2019 10:32 AM UTC Mar 18,2019 07:27 AM UTC ASP.NET Core - EJ 2 1
Tags: Charts
Rikard Schouwstra
Asked On March 14, 2019 10:32 AM UTC


I need to add a series to a pie chart dynamically. Could anyone please assist me on the matter.


Dharanidharan Dharmasivam [Syncfusion]
Replied On March 18, 2019 07:27 AM UTC

Hi Rikard, 
Greeting from Syncfusion.  
We have analyzed your requirement. Your requirement can be achieved by initializing the empty series and then you can add the series dynamically. Find the code snippet below to achieve this requirement. 
<ejs-accumulationchart id="pieChart"> 
                Initialized the empty series 
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; 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon