Class PyramidDataLabelSettings
The PyramidDataLabelSettings class is used to customize the appearance of pyramid chart data labels.
Inherited Members
Namespace: Syncfusion.Maui.Toolkit.Charts
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class PyramidDataLabelSettings : ChartDataLabelSettings, IPyramidDataLabelSettings
Remarks
To customize data labels, create an instance of the PyramidDataLabelSettings class, and set it to the DataLabelSettings property of the pyramid chart.
ShowDataLabels
Data labels can be added to a chart by enabling the ShowDataLabels option.
<chart:SfPyramidChart ItemsSource ="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ShowDataLabels="True"/>
Customization
To change the appearance of data labels, it offers LabelStyle options.
Null values are invalid for LabelStyle.
<chart:SfPyramidChart ItemsSource ="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ShowDataLabels="True">
<chart:SfPyramidChart.DataLabelSettings>
<chart:PyramidDataLabelSettings>
<chart:PyramidDataLabelSettings.LabelStyle>
<chart:ChartDataLabelStyle Background = "Red" FontSize="14" TextColor="Black" />
</chart:PyramidDataLabelSettings.LabelStyle>
</chart:PyramidDataLabelSettings>
</chart:SfPyramidChart.DataLabelSettings>
</chart:SfPyramidChart>
Constructors
PyramidDataLabelSettings()
Initializes a new instance of the PyramidDataLabelSettings.
Declaration
public PyramidDataLabelSettings()
Fields
ContextProperty
Identifies the Context bindable property.
Declaration
public static readonly BindableProperty ContextProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
The identifier for the Context bindable property determines the context of the pyramid data label.
Properties
Context
Gets or sets an option that determines the content to be displayed in the data labels.
Declaration
public PyramidDataLabelContext Context { get; set; }
Property Value
Type | Description |
---|---|
PyramidDataLabelContext | Its accept the PyramidDataLabelContext values and its default value is YValue. |