Class ChartAxisTickStyle
Represents a style class that can be used to customize the axis's tick.
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class ChartAxisTickStyle : Element
Remarks
To customize the chart axis's tick, create an instance of ChartAxisTickStyle and set it to the MajorTickStyle property as shown in the following code sample.
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis MinorTicksPerInterval="4">
<chart:NumericalAxis.MajorTickStyle>
<chart:ChartAxisTickStyle Stroke="Red" StrokeWidth="1"/>
</chart:NumericalAxis.MajorTickStyle>
</chart:NumericalAxis>
</chart:SfCartesianChart.XAxes>
<chart:SfCartesianChart.YAxes>
<chart:NumericalAxis/>
</chart:SfCartesianChart.YAxes>
</chart:SfCartesianChart>
It provides more options to customize the chart axis title.
TickSize - To customize the length of the axis tick, refer to this TickSize property.
Stroke - To customize the color of the axis tick, refer to this Stroke property.
StrokeWidth - To customize the width of the axis ticks, refer to this StrokeWidth property.
Constructors
ChartAxisTickStyle()
Initializes a new instance of the ChartAxisTickStyle.
Declaration
public ChartAxisTickStyle()
Fields
StrokeProperty
Identifies the Stroke bindable property.
Declaration
public static readonly BindableProperty StrokeProperty
Field Value
| Type |
|---|
| BindableProperty |
StrokeWidthProperty
Identifies the StrokeWidth bindable property.
Declaration
public static readonly BindableProperty StrokeWidthProperty
Field Value
| Type |
|---|
| BindableProperty |
TickSizeProperty
Identifies the TickSize bindable property.
Declaration
public static readonly BindableProperty TickSizeProperty
Field Value
| Type |
|---|
| BindableProperty |
Properties
Stroke
Gets or sets a value to customize the stroke color of the axis's tick.
Declaration
public Brush Stroke { get; set; }
Property Value
| Type | Description |
|---|---|
| Brush | It accepts Microsoft.Maui.Controls.Brush values. |
StrokeWidth
Gets or sets a value that indicates the width of the axis's tick.
Declaration
public double StrokeWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| double | It accepts double values and the defaule value is 1. |
Remarks
The value needs to be greater than zero.
TickSize
Gets or sets a value that indicates the length of the axis's tick.
Declaration
public double TickSize { get; set; }
Property Value
| Type | Description |
|---|---|
| double | It accepts double values and the defaule value is 8. |