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

Limit number of Legends

1 Answer 48 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Archana
Top achievements
Rank 1
Archana asked on 10 Jan 2013, 11:14 PM
In my Chart I have around 16-20 Legends and they are taking very much space. I want to show only top 8 Legends and hide the rest. How can I do it? A code sample would be appreciated. Thanks.

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 11 Jan 2013, 04:50 PM
Hello Archana,

You can access individual legend items by using the RadChart's Chart.Legend.Items collection. E.g:
this.RadChart1.Chart.Legend.Items[0].Visible = false;
will hide the very first legend item. This can be done after the appropriate event has fired, such as BeforeLayout.

All the best,
Ivan N.
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
Archana
Top achievements
Rank 1
Answers by
Missing User
Share this question
or