menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartAxisLabel - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartAxisLabel

    Represents label that is shown on axis ticks.

    Inheritance
    System.Object
    ChartAxisLabel
    Implements
    System.IDisposable
    Namespace: Syncfusion.Windows.Chart
    Assembly: Syncfusion.Chart.Wpf.dll
    Syntax
    public class ChartAxisLabel : DependencyObject, IDisposable
    Remarks

    Axis labels could be set from various data sources.

    Examples

    XAML:

     <syncfusion:ChartAxis Header="Year" LabelsSource="{Binding
    Source={StaticResource productlist}}" PositionPath="ID" ContentPath="Year" 
    LabelFontSize="11">

    C#:

     Chart1.Areas[0].PrimaryAxis.LabelsSource = productlist;
                Chart1.Areas[0].PrimaryAxis.PositionPath="ID";
                  Chart1.Areas[0].PrimaryAxis.ContentPath="Year"

    Constructors

    ChartAxisLabel()

    Initializes a new instance of the ChartAxisLabel class.

    Declaration
    public ChartAxisLabel()

    ChartAxisLabel(Double)

    Initializes a new instance of the ChartAxisLabel class.

    Declaration
    public ChartAxisLabel(double position)
    Parameters
    Type Name Description
    System.Double position

    The position.

    ChartAxisLabel(Double, Object)

    Initializes a new instance of the ChartAxisLabel class.

    Declaration
    public ChartAxisLabel(double position, object label)
    Parameters
    Type Name Description
    System.Double position

    The position.

    System.Object label

    The label.

    Fields

    ContentProperty

    Using a DependencyProperty as the backing store for Content. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ContentProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    Axis

    Gets the ChartAxis that label resides.

    Declaration
    public ChartAxis Axis { get; }
    Property Value
    Type
    ChartAxis

    Content

    Gets or sets the content that label should display.

    Declaration
    public object Content { get; set; }
    Property Value
    Type Description
    System.Object

    Label's content.

    Position

    Gets or sets the position of label on axis.

    Declaration
    public double Position { get; set; }
    Property Value
    Type Description
    System.Double

    The position.

    Methods

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()

    ToString()

    Returns a System.String that represents the current System.Object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents the current axis label.

    Implements

    System.IDisposable

    See Also

    ChartAxisLabelsMode
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved