Xceed Chart for WinForms v4.4 Documentation
Xceed.Chart.Core.v4.4 Assembly / Xceed.Chart.Core Namespace / Series Class / Labels Property
Example


In This Topic
    Labels Property (Series)
    In This Topic
    Gives you access to the labels data series.
    Syntax
    'Declaration
     
    <CategoryAttribute("Data Series")>
    <DescriptionAttribute("Labels Data Series")>
    Public Property Labels As DataSeries
    'Usage
     
    Dim instance As Series
    Dim value As DataSeries
     
    instance.Labels = value
     
    value = instance.Labels
    [Category("Data Series")]
    [Description("Labels Data Series")]
    public DataSeries Labels {get; set;}
    Remarks
    The labels data series is of type string and is used to strore the labels of the data points. The labels can be visualized in the data point labels, the chart legend and the data point tooltips.
    Example
    The following code creates a bar chart with labels shown in the data point labels and the legend.
    Dim bar As BarSeries =  Chart.Series.Add(SeriesType.Bar) 
    bar.Values.Add(12, "Bar1")
    bar.Values.Add(23, "Bar2")
    bar.Values.Add(14, "Bar3")
    bar.DataLabels.Mode = DataLabelsMode.Every
    bar.DataLabels.Every = 1
    bar.DataLabels.Format = "&lt;label&gt;"
    bar.Legend.Mode = SeriesLegendMode.DataPoints
    bar.Legend.Format = "&lt;label&gt;"
    BarSeries bar = Chart.Series.Add(SeriesType.Bar);
    bar.Values.Add(12, "Bar1");
    bar.Values.Add(23, "Bar2");
    bar.Values.Add(14, "Bar3");
    bar.DataLabels.Mode = DataLabelsMode.Every;
    bar.DataLabels.Every = 1;
    bar.DataLabels.Format = "&lt;label&gt;";
    bar.Legend.Mode = SeriesLegendMode.DataPoints;
    bar.Legend.Format = "&lt;label&gt;";
    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