Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Core.v4.4 Assembly / Xceed.Chart.Core Namespace / LegendDataItem Class / LineProps Property
Example


In This Topic
    LineProps Property (LegendDataItem)
    In This Topic
    The properties of the legend item mark line.
    Syntax
    'Declaration
     
    <CategoryAttribute("General")>
    <DescriptionAttribute("The properties of the legend item mark line.")>
    Public Property LineProps As LineProperties
    'Usage
     
    Dim instance As LegendDataItem
    Dim value As LineProperties
     
    instance.LineProps = value
     
    value = instance.LineProps
    [Category("General")]
    [Description("The properties of the legend item mark line.")]
    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