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


Xceed.Chart.Core.v4.4 Assembly > Xceed.Chart.Core Namespace > LegendDataItem Class : Text Property
The text of the legend item.
Syntax
'Declaration
 
<CategoryAttribute("General")>

<DescriptionAttribute("The text of the legend item.")>

Public Property Text As String
'Usage
 
Dim instance As LegendDataItem

Dim value As String

 

instance.Text = value

 

value = instance.Text
[Category("General")]

[Description("The text of the legend item.")]

public string Text {get; set;}
Example
The following examples adds a new item to the legend and changes its text.
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