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

Show the series name based on condition in legend.

1 Answer 49 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Ram
Top achievements
Rank 1
Ram asked on 23 Sep 2011, 06:59 AM
Hi Tlerik,

I'm using radchart of line type in my application.
I'm adding serieses to the cart from code behind.
I'm adding 4 series based on the user selction like if user select 1 then I add 1 series, if he select 2 then I add second like that.
But In legend its showiing the all serieses name by default.
But I want to show only whatever series I added to the chart.
If I add 2 serieces I need to show only those 2 serieses names in legend...like that.
How can I do that , please help me.

1 Answer, 1 is accepted

Sort by
0
Accepted
Missing User
answered on 28 Sep 2011, 08:36 AM
Hello Ram,

By default RadChart includes the color and name of each chart series in the legend. This is controlled by the chart when new series is added or removed. You can see how this is implemented in this online demo. Please note that if you add custom legend items they will not be updated when you add or remove series. You can also try to clear the chart series before re-populating it like that:
RadChart1.Series.Clear();

I hope this helps.

All the best,
Polina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Chart (Obsolete)
Asked by
Ram
Top achievements
Rank 1
Answers by
Missing User
Share this question
or