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


In This Topic
    Labels Property (Axis)
    In This Topic
    Gives you access to the collection of strings used for axis labels.
    Syntax
    'Declaration
     
    <CategoryAttribute("Texts")>
    <DescriptionAttribute("Gives you access to the collection of strings used for axis labels. This array contains the string which are visualized on major tick marks if the AutoLabels property of the current axis scale is set to false.")>
    Public Property Labels As TypedArrayList
    'Usage
     
    Dim instance As Axis
    Dim value As TypedArrayList
     
    instance.Labels = value
     
    value = instance.Labels
    [Category("Texts")]
    [Description("Gives you access to the collection of strings used for axis labels. This array contains the string which are visualized on major tick marks if the AutoLabels property of the current axis scale is set to false.")]
    public TypedArrayList Labels {get; set;}
    Remarks
    This array contains the string which are visualized on major tick marks if the AutoLabels property of the current axis scale is set to false.
    Example
    The following code displays custom labels for the PrimaryX axis (assuming that it is in dimension mode).
    Dim axis As Axis =  Chart.Axis(StandardAxis.PrimaryX) 
    axis.DimensionScale.AutoLabels = False
    axis.Labels.Add("Category1")
    axis.Labels.Add("Category2")
    axis.Labels.Add("Category3")
    axis.Labels.Add("Category4")
    Axis axis = Chart.Axis(StandardAxis.PrimaryX);
    axis.DimensionScale.AutoLabels = false;
    axis.Labels.Add("Category1");
    axis.Labels.Add("Category2");
    axis.Labels.Add("Category3");
    axis.Labels.Add("Category4");
    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