Xceed Chart for WinForms v4.4 Documentation
LegendDataItem Constructor(String,LegendMarkShape,LineProperties,FillEffect)
Example 


Xceed.Chart.Core.v4.4 Assembly > Xceed.Chart.Core Namespace > LegendDataItem Class > LegendDataItem Constructor : LegendDataItem Constructor(String,LegendMarkShape,LineProperties,FillEffect)
Creates a new legend item with the specified parameters.
Syntax
'Declaration
 
Public Function New( _

   ByVal sText As String, _

   ByVal nShape As LegendMarkShape, _

   ByVal MarkLineProps As LineProperties, _

   ByVal MarkFillEffect As FillEffect _

)
'Usage
 
Dim sText As String

Dim nShape As LegendMarkShape

Dim MarkLineProps As LineProperties

Dim MarkFillEffect As FillEffect

 

Dim instance As New LegendDataItem(sText, nShape, MarkLineProps, MarkFillEffect)
public LegendDataItem( 

   string sText,

   LegendMarkShape nShape,

   LineProperties MarkLineProps,

   FillEffect MarkFillEffect

)

Parameters

sText
nShape
MarkLineProps
MarkFillEffect
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.
Legend legend = (Legend)NChartControl.Legends[0];

legend.Mode = LegendMode.Manual;



LegendDataItem item = new LegendDataItem("New item", LegendMarkShape.Rectangle, new LineProperties(1, Color.Black), new FillEffect(Color.Red));

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