Class ChartAxisLabelStyle
Represents the chart axis's label style class.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class ChartAxisLabelStyle : ChartLabelStyle, ITextElement, IThemeElement
Remarks
To customize the axis labels appearance, create an instance of the ChartAxisLabelStyle class and set to the LabelStyle property.
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.LabelStyle>
<chart:ChartAxisLabelStyle TextColor = "Red" FontSize="14"/>
</chart:CategoryAxis.LabelStyle>
</chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>
</chart:SfCartesianChart>
It provides more options to customize the chart axis label.
LabelAlignment - To position the axis label, refer to this LabelAlignment property.
LabelFormat - To customize the numeric or date-time format of the axis label, refer to this LabelFormat property.
TextColor - To customize the text color, refer to this TextColor property.
Background - To customize the background color, refer to this Background property.
Stroke - To customize the stroke color, refer to this Stroke property.
StrokeWidth - To modify the stroke width, refer to this StrokeWidth property.
Constructors
ChartAxisLabelStyle()
Initializes a new instance of the ChartAxisLabelStyle.
Declaration
public ChartAxisLabelStyle()
Fields
LabelAlignmentProperty
Identifies the LabelAlignment bindable property.
Declaration
public static readonly BindableProperty LabelAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
LabelAlignment
Gets or sets a value that indicates the position of the axis label.
Declaration
public ChartAxisLabelAlignment LabelAlignment { get; set; }
Property Value
Type | Description |
---|---|
ChartAxisLabelAlignment | It accepts ChartAxisLabelAlignment values and the default value is Center. |