Xceed Chart for WinForms v4.4 Documentation
LegendDataItem Constructor()
Example 


Xceed.Chart.Core.v4.4 Assembly > Xceed.Chart.Core Namespace > LegendDataItem Class > LegendDataItem Constructor : LegendDataItem Constructor()
Creates a new empty legend item with rectangle mark.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New LegendDataItem()
public LegendDataItem()
Remarks
The legend should be set in LegendMode.Manual before you can insert custom legend items.
Example
The following examples adds a new item to the legend.
Dim legend As Legend = CType(NChartControl.Legends(0), Legend)
legend.Mode = LegendMode.Manual

Dim item As LegendDataItem =  New LegendDataItem() 
item.Text = "New item"
legend.Data.Array.Add(item)
Legend legend = (Legend)NChartControl.Legends[0];
legend.Mode = LegendMode.Manual;

LegendDataItem item = new LegendDataItem();
item.Text = "New item";
legend.Data.Array.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

LegendDataItem Class
LegendDataItem Members
Overload List