Class ChartAxisLabel
Represents label that is shown on axis ticks.
Inheritance
Implements
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. |