SeriesLabel.TextPattern Property
Gets or sets a text pattern for series point labels. This is a bindable property.
Namespace: DevExpress.Maui.Charts
Assembly: DevExpress.Maui.Charts.dll
NuGet Package: DevExpress.Maui.Charts
Declaration
public string TextPattern { get; set; }
Property Value
Type | Description |
---|---|
String | The text pattern. |
Remarks
Use the TextPattern property to format series label text. The pattern comprises regular text (which is displayed as is) and placeholder strings enclosed in braces. Placeholders define which values are shown in labels.
Below is a list of available placeholders.
Placeholder | Description |
---|---|
{S} | Displays a series name. |
{A} | Displays a series point argument. |
{L} | Displays a pie series point label. |
{V} | Displays a series point value. |
{VP} | Displays a series point value as percentages. |
{W} | Displays a Bubble series point weight. |
{O} | Displays a financial series point open value. |
{H} | Displays a financial series point high value. |
{L} | Displays a financial series point low value. |
{C} | Displays a financial series point close value. |
{HV} | Displays a range bar series point max value. |
{LV} | Displays a range bar series point min value. |
Note
These values can be formatted using default format strings after the $
sign.
For example, in the {VP$#.##}
string, VP
is a placeholder, $
is a format string separator, and #.##
is a format string.
Example
This example adds 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>