Show the series name based on condition in legend.

Thread is closed for posting
2 posts, 1 answers
  1. Ram
    Ram avatar
    97 posts
    Member since:
    Jun 2011

    Posted 23 Sep 2011 Link to this post

    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 that.
    How can I do that , please help me.
  2. Answer
    Missing user
    Missing user avatar

    Posted 28 Sep 2011 Link to this post

    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:

    I hope this helps.

    All the best,
    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