Xceed Chart for WinForms v4.4 Documentation
Items Property
Example 


Xceed.Chart.Core.v4.4 Assembly > Xceed.Chart.Core Namespace > LegendData Class : Items Property
The data contained in the legend.
Syntax
'Declaration
 
<CategoryAttribute("General")>
<DescriptionAttribute("The data contained in the legend when legend mode is LegendMode.Manual")>
Public Property Items As LegendDataItemCollection
'Usage
 
Dim instance As LegendData
Dim value As LegendDataItemCollection
 
instance.Items = value
 
value = instance.Items
[Category("General")]
[Description("The data contained in the legend when legend mode is LegendMode.Manual")]
public LegendDataItemCollection Items {get; set;}
Remarks
The array contains LegendDataItem objects representing the data items in the legend. You can add custom legend items by adding new objects of the LegendDataItem class to the array when the legend mode is LegendMode.Manual.
Example
The following example creates a new legend item and adds it to the legend.
Dim legend As Legend = CType(NChartControl.Legends(0), Legend)
legend.Mode = LegendMode.Manual
item = New LegendDataItem()
item.Text = "Custom legend item"
item.MarkShape = LegendMarkShape.Rectangle
legend.Data.Items.Add(item)
Legend legend = (Legend)NChartControl.Legends[0];
legend.Mode = LegendMode.Manual;
item = new LegendDataItem();
item.Text = "Custom legend item"
item.MarkShape = LegendMarkShape.Rectangle;
legend.Data.Items.Add(item);
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

LegendData Class
LegendData Members