This is a migrated thread and some comments may be shown as answers.

Remove Series from Chart

1 Answer 171 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ryan Hertz
Top achievements
Rank 1
Ryan Hertz asked on 16 Mar 2010, 08:20 PM
I'm having some difficulty in figuring out how to remove a series programmatically.

I am attempting something like:

If RadChart1.Series.Count = 3 Then RadChart1.Series(2).Remove() 

To which I receive:

Object reference not set to an instance of an object.



Thanks in advance,
Ryan


1 Answer, 1 is accepted

Sort by
0
Accepted
Velin
Telerik team
answered on 18 Mar 2010, 01:31 PM
Hi Ryan Hertz,

To remove a series from the series collection of RadChart you can use code like this:
RadChart1.Series.RemoveAt(2)


Best wishes,
Velin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Chart (Obsolete)
Asked by
Ryan Hertz
Top achievements
Rank 1
Answers by
Velin
Telerik team
Share this question
or