Class PyramidDataLabelSettings
The PyramidDataLabelSettings class is used to customize the appearance of pyramid chart data labels.
Inherited Members
Namespace: Syncfusion.Maui.Charts
Assembly: Syncfusion.Maui.Charts.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 series 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.
<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 |
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 default value is YValue. |