Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Server.v4.4 Assembly / Xceed.Chart.Server Namespace / ChartServerControl Class / Legends Property
Example


In This Topic
    Legends Property (ChartServerControl)
    In This Topic
    Retrieves the legends collection of the component.
    Syntax
    'Declaration
     
    <CategoryAttribute("Xceed Chart for ASP.NET")>
    <DescriptionAttribute("Chart background")>
    <DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)>
    <BinarySerializationPropertyAttribute()>
    Public Property Legends As LegendCollection
    'Usage
     
    Dim instance As ChartServerControl
    Dim value As LegendCollection
     
    instance.Legends = value
     
    value = instance.Legends
    [Category("Xceed Chart for ASP.NET")]
    [Description("Chart background")]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
    [BinarySerializationProperty()]
    public LegendCollection Legends {get; set;}
    Remarks
    Xceed Chart for WinForms supports an unlimited number of legends to be displayed in the chart control canvas. Each legend is represented by a Legend object contained by the Legends collection of the control. By default the collection contains only one legend. Each legend can display information for one or more charts as well as customer defined data.
    Example
    The following example changes the first legend position.
    Dim legend As Legend = CType(ChartServerControl1.Legends(0), Legend)
    legend.SetPredefinedLegendStyle(PredefinedLegendStyle.TopRight)
    Legend legend = (Legend)ChartServerControl1.Legends[0];
    legend.SetPredefinedLegendStyle(PredefinedLegendStyle.TopRight);
    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