Welcome to the Xceed Community Sign in | Join | Help
Community Search  

Completely custommade legend

Sort Posts: Previous Next
  •  02-08-2008, 2:35 AM Post no. 6584

    Completely custommade legend

    Hi!

    How can I make ny own legend for a chart? I want to add five points to a legend that all have their own color mark and text. They won't be related to their own series, because the data is all in one series. I would also like to separate these points in the legend with separator lines.
  •  02-08-2008, 5:06 AM Post no. 6585 in reply to 6584

    Re: Completely custommade legend

    Never mind, I found the solution myself:

    Legend legend = (Xceed.Chart.Core.Legend)(cscResult.Legends[0]);
    legend.Mode = LegendMode.Manual;

    LegendDataItem item = new LegendDataItem();
    item.Text = "Some text";
    item.MarkFillEffect.Color = Color.White;
    item.MarkShape = LegendMarkShape.Rectangle;
    legend.Data.Items.Add(item);
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.