Class FunnelDataLabelSettings
The FunnelDataLabelSettings class is used to customize the appearance of funnel chart data labels.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Charts
Assembly: Syncfusion.Chart.WinUI.dll
Syntax
public sealed class FunnelDataLabelSettings : ChartDataLabelSettings
Remarks
To customize data labels, create an instance of the FunnelDataLabelSettings class, and set it to the DataLabelSettings property of a funnel chart.
ShowDataLabels
Data labels can be added to a chart by enabling the ShowDataLabels option.
<chart:SfFunnelChart ItemsSource ="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ShowDataLabels="True">
</chart:SfFunnelChart>
ContentTemplate
The appearance of the data label can be customized using the ContentTemplate property of FunnelDataLabelSettings.
<chart:SfFunnelChart ItemsSource ="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ShowDataLabels="True">
<chart:SfFunnelChart.DataLabelSettings>
<chart:FunnelDataLabelSettings>
<chart:FunnelDataLabelSettings.ContentTemplate>
<DataTemplate>
<StackPanel Margin = "10" Orientation="Vertical">
<Ellipse Height = "15" Width="15" Fill="Cyan"
Stroke="#4a4a4a" StrokeThickness="2"/>
<TextBlock HorizontalAlignment = "Center" FontSize="12"
Foreground="Black" FontWeight="SemiBold"
Text="{Binding}"/>
</StackPanel>
</DataTemplate>
</chart:FunnelDataLabelSettings.ContentTemplate>
</chart:FunnelDataLabelSettings>
</chart:SfFunnelChart.DataLabelSettings>
</chart:SfFunnelChart>
Context
To customize the content of data labels, it offers Context property.
<chart:SfFunnelChart ItemsSource ="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ShowDataLabels="True">
<chart:SfFunnelChart.DataLabelSettings>
<chart:FunnelDataLabelSettings Context="Percentage" />
</chart:SfFunnelChart.DataLabelSettings>
</chart:SfFunnelChart>
Customization
To change the appearance of data labels, it offers BorderBrush, BorderThickness, Margin, Foreground, Background, FontStyle, FontSize, and FontFamily options.
<chart:SfFunnelChart ItemsSource ="{Binding Data}"
XBindingPath="XValue"
YBindingPath="YValue"
ShowDataLabels="True">
<chart:SfFunnelChart.DataLabelSettings>
<chart:FunnelDataLabelSettings Foreground="White" FontSize="11"
FontFamily="Calibri" BorderBrush="Black" BorderThickness="1" Margin="1"
FontStyle="Italic" Background="#1E88E5" />
</chart:SfFunnelChart.DataLabelSettings>
</chart:SfFunnelChart>
Constructors
FunnelDataLabelSettings()
Initializes a new instance of the FunnelDataLabelSettings class.
Declaration
public FunnelDataLabelSettings()