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

Remove all series

Thread ID:





142995 Feb 28,2019 05:30 AM UTC Mar 1,2019 07:04 AM UTC ASP.NET Core - EJ 2 1
Tags: Charts
Rikard Schouwstra
Asked On February 28, 2019 05:30 AM UTC


I am trying ro remove and add series to a line chart dynamically but I do not now how to remove all series, I can only remove one at a time and when I iterate over the series array it does not remove them all. Any help would be appreciated.


Dharanidharan Dharmasivam [Syncfusion]
Replied On March 1, 2019 07:04 AM UTC

Hi Rikard, 
Greetings from Syncfusion. We have analyzed our query. We are already having removeSeries method to remove the series. By using this, you can remove the series one at a time. However, your requirement can be achieved as a workaround by assigning empty array to series and refresh the chart. Find the code snippet below to achieve this requirement. 
document.getElementById("remove").onclick = function () { 
        var chart = document.getElementById("container").ej2_instances[0]; 
        //Assigning empty array to series and refresh the chart 
        chart.series = []; 
Hope this helps. 


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