Class ChartPlotBandLabelStyle
Represents a LabelStyle class that can be used to customize the plot band labels.
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Charts
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class ChartPlotBandLabelStyle : ChartLabelStyle, ITextElement, IThemeElement
Remarks
It provides more options to customize the plot band label.
HorizontalAlignment - To adjust the alignment for labels, refer to this HorizontalTextAlignment property.
VerticalAlignment - To adjust the alignment for labels, refer to this VerticalTextAlignment property.
Angle - To adjust the angle rotation for labels, refer to this Angle property.
OffsetX - To adjust the padding for labels, refer to this OffsetX property.
OffsetY - To adjust the padding for labels, refer to this OffsetY property.
Constructors
ChartPlotBandLabelStyle()
Initializes a new instance of the ChartPlotBandLabelStyle.
Declaration
public ChartPlotBandLabelStyle()
Fields
AngleProperty
Identifies the Angle bindable property.
Declaration
public static readonly BindableProperty AngleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the Angle bindable property determines the rotation angle of the chart plot band labels.
HorizontalTextAlignmentProperty
Identifies the HorizontalTextAlignment bindable property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the HorizontalTextAlignment bindable property determines the vertical text alignment of the chart plot band labels.
OffsetXProperty
Identifies the OffsetX bindable property.
Declaration
public static readonly BindableProperty OffsetXProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the OffsetX bindable property determines the horizontal offset of the chart plot band labels.
OffsetYProperty
Identifies the OffsetY bindable property.
Declaration
public static readonly BindableProperty OffsetYProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the OffsetY bindable property determines the vertical offset of the chart plot band labels.
VerticalTextAlignmentProperty
Identifies the VerticalTextAlignment bindable property.
Declaration
public static readonly BindableProperty VerticalTextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the VerticalTextAlignment bindable property determines the vertical text alignment of the chart plot band labels.
Properties
Angle
Gets or sets a value that indicates the angle rotation of the plot band label text.
Declaration
public double Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and the default value is 0. |
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.PlotBands>
<chart:NumericalPlotBandCollection>
<chart:NumericalPlotBand Start="1" Size="1">
<chart:NumericalPlotBand.LabelStyle>
<chart:ChartPlotBandLabelStyle Angle="90"/>
</chart:NumericalPlotBand.LabelStyle>
</chart:NumericalPlotBandCollection>
</chart:CategoryAxis.PlotBands>
</chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>
</chart:SfCartesianChart>
HorizontalTextAlignment
Gets or sets the horizontal alignment of the plot band label text.
Declaration
public ChartLabelAlignment HorizontalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
ChartLabelAlignment | This property takes the ChartLabelAlignment as its value. Its default value is Center. |
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.PlotBands>
<chart:NumericalPlotBandCollection>
<chart:NumericalPlotBand Start="1" Size="1">
<chart:NumericalPlotBand.LabelStyle>
<chart:ChartPlotBandLabelStyle HorizontalTextAlignment="Start"/>
</chart:NumericalPlotBand.LabelStyle>
</chart:NumericalPlotBandCollection>
</chart:CategoryAxis.PlotBands>
</chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>
</chart:SfCartesianChart>
OffsetX
Gets or sets a value to provide horizontal padding to the plot band label text.
Declaration
public double OffsetX { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and the default value is 0. |
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.PlotBands>
<chart:NumericalPlotBandCollection>
<chart:NumericalPlotBand Start="1" Width="1">
<chart:NumericalPlotBand.LabelStyle>
<chart:ChartPlotBandLabelStyle OffsetX="5"/>
</chart:NumericalPlotBand.LabelStyle>
</chart:NumericalPlotBandCollection>
</chart:CategoryAxis.PlotBands>
</chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>
</chart:SfCartesianChart>
OffsetY
Gets or sets a value to provide vertical padding to the plot band label text.
Declaration
public double OffsetY { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and the default value is 0. |
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.PlotBands>
<chart:NumericalPlotBandCollection>
<chart:NumericalPlotBand Start="1" Size="1">
<chart:NumericalPlotBand.LabelStyle>
<chart:ChartPlotBandLabelStyle OffsetY="10"/>
</chart:NumericalPlotBand.LabelStyle>
</chart:NumericalPlotBandCollection>
</chart:CategoryAxis.PlotBands>
</chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>
</chart:SfCartesianChart>
VerticalTextAlignment
Gets or sets the vertical alignment of the plot band label text.
Declaration
public ChartLabelAlignment VerticalTextAlignment { get; set; }
Property Value
Type | Description |
---|---|
ChartLabelAlignment | This property takes the ChartLabelAlignment as its value. Its default value is Center. |
Examples
<chart:SfCartesianChart>
<chart:SfCartesianChart.XAxes>
<chart:CategoryAxis>
<chart:CategoryAxis.PlotBands>
<chart:NumericalPlotBandCollection>
<chart:NumericalPlotBand Start="1" Size="1">
<chart:NumericalPlotBand.LabelStyle>
<chart:ChartPlotBandLabelStyle VerticalTextAlignment="End"/>
</chart:NumericalPlotBand.LabelStyle>
</chart:NumericalPlotBandCollection>
</chart:CategoryAxis.PlotBands>
</chart:CategoryAxis>
</chart:SfCartesianChart.XAxes>
</chart:SfCartesianChart>