Back to Devexpress

PieSeriesLabel.Style Property

maui-devexpress-dot-maui-dot-charts-dot-pieserieslabel-0731db1c.md

latest2.6 KB
Original Source

PieSeriesLabel.Style Property

Gets or sets a style of pie series labels. This is a bindable property.

Namespace : DevExpress.Maui.Charts

Assembly : DevExpress.Maui.Charts.dll

NuGet Package : DevExpress.Maui.Charts

Declaration

csharp
public PieSeriesLabelStyle Style { get; set; }

Property Value

TypeDescription
PieSeriesLabelStyle

A PieSeriesLabelStyle object that represents a label style.

|

Remarks

Assign a PieSeriesLabelStyle object with the specified label appearance settings (TextStyle and ConnectorThickness) to the Style property to customize the pie series label appearance.

Example

This example adds labels to pie chart segments, customize the text pattern, layout and appearance of series labels.

xaml
<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>
csharp
pieSeries.Label = new PieSeriesLabel {
  Position = PieSeriesLabelPosition.TwoColums,
  TextPattern = "{VP}%",
  Indent = 20,
  Style = new PieSeriesLabelStyle {
      ConnectorThickness = 2,
      TextStyle = new TextStyle { Color = Color.DarkBlue, Size = 20} }
};

See Also

PieSeriesLabel Class

PieSeriesLabel Members

DevExpress.Maui.Charts Namespace