Class ChartDataLabelStyle
Represents a LabelStyle class that can be used to customize the data labels.
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Charts
Assembly: Syncfusion.Maui.Toolkit.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 |
Remarks
The identifier for the Angle bindable property determines the angle rotation of the data label.
LabelPaddingProperty
Identifies the LabelPadding bindable property.
Declaration
public static readonly BindableProperty LabelPaddingProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the LabelPadding bindable property determines the padding of the data label.
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 data label.
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 data label.
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 default value is 0. |
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 default value is 3. |
Remarks
This property adjusts the position of data labels for better alignment and visualization within the chart.
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 default 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 default value is 0. |