mobilecontrols-devexpress-dot-xamarinforms-dot-charts-7b736658.md
Stores pie series label settings.
Namespace : DevExpress.XamarinForms.Charts
Assembly : DevExpress.XamarinForms.Charts.dll
NuGet Package : DevExpress.XamarinForms.Charts
public class PieSeriesLabel :
SeriesLabel
The following members return PieSeriesLabel objects:
Series Point Labels (or series labels, for short) are used to identify particular data points within a series.
Series labels are hidden by default. To display them on a pie chart, create a PieSeriesLabel object and assign it to the PieSeries.Label property. The PieSeriesLabel class has a set of properties that you can use to specify label position and appearance:
You can also use the PieSeriesLabel.TextProvider property to generate custom text strings for series labels based on point values.
This example demonstrates how to add labels to pie chart segments, customize the text pattern, layout and appearance of series labels.
<dxc:PieChartView>
<dxc:PieChartView.Series>
<dxc:PieSeries>
<dxc:PieSeries.Label>
<dxc:PieSeriesLabel Position="TwoColums" TextPattern="{}{VP}%" Indent="20">
<dxc:PieSeriesLabel.Style>
<dxc:PieSeriesLabelStyle ConnectorThickness="2">
<dxc:PieSeriesLabelStyle.TextStyle>
<dxc:TextStyle Color="DarkBlue" Size="20"/>
</dxc:PieSeriesLabelStyle.TextStyle>
</dxc:PieSeriesLabelStyle>
</dxc:PieSeriesLabel.Style>
</dxc:PieSeriesLabel>
</dxc:PieSeries.Label>
</dxc:PieSeries>
</dxc:PieChartView.Series>
</dxc:PieChartView>
pieSeries.Label = new PieSeriesLabel {
Position = PieSeriesLabelPosition.TwoColums,
TextPattern = "{VP}%",
Indent = 20,
Style = new PieSeriesLabelStyle {
ConnectorThickness = 2,
TextStyle = new TextStyle { Color = Color.DarkBlue, Size = 20} }
};
Object ChartElement StyledElement SeriesLabel PieSeriesLabel
See Also