Class ChartDataLabelStyle
Represents a LabelStyle class that can be used to customize the data labels.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.dll
Syntax
public class ChartDataLabelStyle : ChartLabelStyle, ITextElement, IThemeElement
Remarks
It provides more options to customize the data label.
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.
Margin - To adjust the outer margin for labels, refer to this Margin property.
LabelPadding - To adjust the padding for labels, refer to this LabelPadding property.
Angle - To adjust the angle rotation for labels, refer to this Angle property.
Constructors
ChartDataLabelStyle()
Initializes a new instance of the ChartDataLabelStyle.
Declaration
public ChartDataLabelStyle()
Fields
AngleProperty
Identifies the Angle bindable property.
Declaration
public static readonly BindableProperty AngleProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
LabelPaddingProperty
Identifies the LabelPadding bindable property.
Declaration
public static readonly BindableProperty LabelPaddingProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
OffsetXProperty
Identifies the OffsetX bindable property.
Declaration
public static readonly BindableProperty OffsetXProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
OffsetYProperty
Identifies the OffsetY bindable property.
Declaration
public static readonly BindableProperty OffsetYProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Properties
Angle
Gets or sets a value that indicates the angle rotation of the data label.
Declaration
public double Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and the defaule value is 0. |
Remarks
This property is only applicable for cartesian series and polar series.
LabelPadding
Gets or sets a value that indicates the label's padding.
Declaration
public double LabelPadding { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and the defaule value is 3. |
Remarks
This property adjusts the position of data labels for better alignment and moves them in the respective direction. For example, positive labels in column series will be moved downwards and negative labels will be moved upwards. This property is only applicable for cartesian series and polar series.
OffsetX
Gets or sets a value to adjust the data label position horizontally.
Declaration
public double OffsetX { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and the defaule value is 0. |
OffsetY
Gets or sets a value to adjust the data label position vertically.
Declaration
public double OffsetY { get; set; }
Property Value
Type | Description |
---|---|
System.Double | It accepts System.Double values and the defaule value is 0. |