One series with multiple legends

4 posts, 0 answers
  1. Prabodh
    Prabodh avatar
    5 posts
    Member since:
    May 2009

    Posted 25 May 2009 Link to this post

    Hi,

    I am new to RAD controls. I am using RadChart control and facing one problem.

    I am having one chart control of type pie on the form with only one series containing 4 items. I want to show four legends at the right side with same color as that of each item in the chart. Legend color should be associated with series item.

    can somebody help me on this?
    also how to change color of particular item in the series? This changed color should reflect to associated series item.

    please treat this as urgent.

    Thanks and regards,
    Prabodh
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 27 May 2009 Link to this post

    Hi Prabodh,

    Here is a sample code:
    // Change the legend display mode of the first series: 
    this.radChart1.Series[0].Appearance.LegendDisplayMode = Telerik.Charting.ChartSeriesLegendDisplayMode.ItemLabels; 
     
    // Change the appearance of the first item in the first series: 
    this.radChart1.Series[0][0].Appearance.FillStyle.MainColor = Color.Red; 
    this.radChart1.Series[0][0].Appearance.FillStyle.SecondColor = Color.DarkRed; 

    Best,
    Evtim
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Prabodh
    Prabodh avatar
    5 posts
    Member since:
    May 2009

    Posted 27 May 2009 Link to this post

    Thanks Evtim,

    I got it worked now.

    One more question.  Legends are appearing on the pie chart itself. I mean inside the box that appears around the graph. 

    Can I move it outside that box?

    Thanks and regards,
    Prabodh
  5. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 29 May 2009 Link to this post

    Hi Prabodh,

    Unfortunately, the legend is part of the RadChart and cannot be moved outside.

    All the best,
    Evtim
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top