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


Xceed.Chart.Core.v4.4 Assembly > Xceed.Chart.Core Namespace > LegendDataItem Class : LineProps Property
The properties of the legend item mark line.
Syntax
'Declaration
 
<DescriptionAttribute("The properties of the legend item mark line.")>
<CategoryAttribute("General")>
Public Property LineProps As LineProperties
'Usage
 
Dim instance As LegendDataItem
Dim value As LineProperties
 
instance.LineProps = value
 
value = instance.LineProps
[Description("The properties of the legend item mark line.")]
[Category("General")]
public LineProperties LineProps {get; set;}
Remarks
Mark lines can be very useful if you use display line charts and would like the legend to show descriptive information about them. In this case you may wish to synchronize the mark line with the line properties of the chart in order to visually associate the chart with the legend item. This is done automatically when the legend operates in Automatic mode.
Example
The following examples adds a new item to the legend and changes the mark line properties.
Dim legend As Legend = CType(NChartControl.Legends(0), Legend)
legend.Mode = LegendMode.Manual

Dim item As LegendDataItem =  New LegendDataItem() 
item.Text = "New item"
item.MarkShape = LegendMarkShape.None
item.LineProps.Width = 1
item.LineProps.Color = Color.Red

legend.Data.Array.Add(item)
Legend legend = (Legend)NChartControl.Legends[0];
legend.Mode = LegendMode.Manual;

LegendDataItem item = new LegendDataItem();
item.Text = "New item";
item.MarkShape = LegendMarkShape.None;
item.LineProps.Width = 1;
item.LineProps.Color = 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