Class ChartAxisRangeStyle
Represents the range style class used to customize the grid lines, tick lines and labels of a chart axis within a specified range.
Inheritance
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class ChartAxisRangeStyle : Element
Remarks
To customize axis elements within a specific range, create an instance of this class, set the Start and End values, customize the style properties, and add it to the RangeStyles collection.
The Start and End values accept numeric, date-time, or category index values depending on the axis type.
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:NumericalAxis>
<chart:NumericalAxis.RangeStyles>
<chart:ChartAxisRangeStyleCollection>
<chart:ChartAxisRangeStyle Start="15" End="21">
<chart:ChartAxisRangeStyle.MajorGridLineStyle>
<chart:ChartLineStyle Stroke="#096EBF" StrokeWidth="3"/>
</chart:ChartAxisRangeStyle.MajorGridLineStyle>
<chart:ChartAxisRangeStyle.LabelStyle>
<chart:ChartAxisLabelStyle TextColor="#096EBF" FontAttributes="Bold"/>
</chart:ChartAxisRangeStyle.LabelStyle>
</chart:ChartAxisRangeStyle>
</chart:ChartAxisRangeStyleCollection>
</chart:NumericalAxis.RangeStyles>
</chart:NumericalAxis>
</chart:SfCartesianChart.XAxes>
</chart:SfCartesianChart>
Constructors
ChartAxisRangeStyle()
Initializes a new instance of the ChartAxisRangeStyle class.
Declaration
public ChartAxisRangeStyle()
Remarks
The style properties are intentionally left null by default. Only the styles explicitly set on a range are applied within that range; unset styles fall back to the axis-level styles, and overlapping ranges resolve each element style independently (the last range that sets a style wins).
Fields
EndProperty
Identifies the End bindable property.
Declaration
public static readonly BindableProperty EndProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for End bindable property. |
LabelStyleProperty
Identifies the LabelStyle bindable property.
Declaration
public static readonly BindableProperty LabelStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for LabelStyle bindable property. |
MajorGridLineStyleProperty
Identifies the MajorGridLineStyle bindable property.
Declaration
public static readonly BindableProperty MajorGridLineStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MajorGridLineStyle bindable property. |
MajorTickStyleProperty
Identifies the MajorTickStyle bindable property.
Declaration
public static readonly BindableProperty MajorTickStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MajorTickStyle bindable property. |
MinorGridLineStyleProperty
Identifies the MinorGridLineStyle bindable property.
Declaration
public static readonly BindableProperty MinorGridLineStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MinorGridLineStyle bindable property. |
MinorTickStyleProperty
Identifies the MinorTickStyle bindable property.
Declaration
public static readonly BindableProperty MinorTickStyleProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for MinorTickStyle bindable property. |
StartProperty
Identifies the Start bindable property.
Declaration
public static readonly BindableProperty StartProperty
Field Value
| Type | Description |
|---|---|
| Microsoft.Maui.Controls.BindableProperty | The identifier for Start bindable property. |
Properties
End
Gets or sets the End Range of ChartAxisRangeStyle.
Declaration
public object End { get; set; }
Property Value
| Type |
|---|
| System.Object |
LabelStyle
Gets or sets the options for customizing the axis labels.
Declaration
public ChartAxisLabelStyle LabelStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ChartAxisLabelStyle | This property takes the ChartAxisLabelStyle as its value. |
MajorGridLineStyle
Gets or sets the customized style for the major grid line.
Declaration
public ChartLineStyle MajorGridLineStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ChartLineStyle | This property takes ChartLineStyle instance as value, which encapsulates the customization properties for major gridlines. |
MajorTickStyle
Gets or sets the customized style for the major tick lines.
Declaration
public ChartAxisTickStyle MajorTickStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ChartAxisTickStyle | This property takes ChartAxisTickStyle instance as value, which encapsulates the customization properties for major ticks. |
MinorGridLineStyle
Gets or sets the customized style for the minor grid line.
Declaration
public ChartLineStyle MinorGridLineStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ChartLineStyle | This property takes ChartLineStyle instance as value, which encapsulates the customization properties for minor gridlines. |
MinorTickStyle
Gets or sets the customized style for the minor tick lines.
Declaration
public ChartAxisTickStyle MinorTickStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ChartAxisTickStyle | This property takes ChartAxisTickStyle instance as value, which encapsulates the customization properties for minor ticks. |
Start
Gets or sets the Start Range of ChartAxisRangeStyle.
Declaration
public object Start { get; set; }
Property Value
| Type |
|---|
| System.Object |