Limit number of Legends

Thread is closed for posting
2 posts, 0 answers
  1. Archana
    Archana avatar
    17 posts
    Member since:
    Jun 2011

    Posted 10 Jan 2013 Link to this post

    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.
  2. Missing user
    Missing user avatar

    Posted 11 Jan 2013 Link to this post

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top