Set label for chartSeries

6 posts, 0 answers
  1. Nadine
    Nadine avatar
    20 posts
    Member since:
    Jan 2009

    Posted 22 Jan 2009 Link to this post

    Hello,

    actually I try to add a label to a chartSeries... is this possible?

    I can do this for an item - but I don't succeed for my Series (Pie)...

    If this is not possible - can you tell me how to change the border color of the legend items?
    When I add chartSeries to my chart, every legend item gets the same border and fill color. So I can't see to which chartSeries the legend item belongs.

    Thank you

    Best regards.

    Nadine

  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 23 Jan 2009 Link to this post

    Hi Nadine,

    I am not sure I understand the first question. Can you, please, provide a more detailed explanation to what you want to show in the Legend? A sketch will be great, as well.

    On the second question, applying color to the legend items should be done on BeforeLayout event, to ensure all required items are generated. Here is a sample code:
    public Form1() 
        InitializeComponent(); 
        this.radChart1.BeforeLayout += new EventHandler<EventArgs>(this.radChart1_BeforeLayout); 
     
    private void radChart1_BeforeLayout(object sender, EventArgs e) 
        this.radChart1.Legend.Items[0].Appearance.Border.Color = Color.Red; 
        this.radChart1.Legend.Items[0].Appearance.Border.Visible = true

    Best regards,
    Evtim
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nadine
    Nadine avatar
    20 posts
    Member since:
    Jan 2009

    Posted 23 Jan 2009 Link to this post

    Hello,

    I'll try to explain it more detailed.

    I have a chart an want to add i.e. 2 pie-charts (2 chart series). Then I add several items (pieces) to the pie.
    The items have labels which are displayed (i.e. 45%...).
    But I want to add a label to each pie additionally (i.e. name of university). Is this possible? Normally this will be displayed in the legend, right? But I would prefer it to display it in a label/title over each pie...

    Thanks for your explanation regarding the legend items. I'll try it, if there is no possibility to add labels to the pie charts.

    Best regards.

    Nadine
  5. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 26 Jan 2009 Link to this post

    Hello Nadine,

    Unfortunately, RadChart does not provide the means to display individual pie labels. Please, accept our apologies for the inconvenience caused.

    Kind regards,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Nadine
    Nadine avatar
    20 posts
    Member since:
    Jan 2009

    Posted 26 Jan 2009 Link to this post

    Thank you for your reply.

    I think, this would be a good feature... perhaps you could consider to realize this in a futurer release?

    Best regards.

    Nadine
  7. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 26 Jan 2009 Link to this post

    Hello Nadine,

    Thanks for this suggestion. I will forward it to our developers for further consideration. Your Telerik points have been updated.

    Regards,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for WinForms is Visual Studio 2017 Ready