Skip to main content

SeriesLabel.TextPattern Property

Gets or sets a string which represents the pattern specifying the text to be displayed within series labels.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v14.2.dll

#Declaration

[XtraSerializableProperty]
public string TextPattern { get; set; }

#Property Value

Type Description
String

A String, which represents the pattern. The default value is Empty.

#Remarks

Use the TextPattern property to define a pattern for displaying text by series labels. Various placeholders enclosed in braces correspond to the available display patterns. For example, a pair of placeholders specified together (e.g., {A} - {V}), will cause each data point to be represented by both its argument and value, separated by a hyphen.

NOTE

The series labels are hidden by default for a series. To see how the TextPattern property affects the label format, set the Series.LabelsVisibility property to true.

A full list of available placeholders is detailed below.

Pattern Description
{A} Displays a series point argument.
{V} Displays series point values.
{VP} Displays series point values as percentages (for a Pie and Donut, Nested Donut series and Full-Stacked series).
{S} Displays the name of the series.
{G} Displays the name of a stacked group.
{W} Displays the weight (for a Bubble series).
{V1} Displays the first value (for a Range Area series).
{V2} Displays the second value (for a Range Area series).
{VD} Displays the duration between the first and second data point values (for a Range Area series).
{HV} Displays the high value (for a Financial Series series).
{LV} Displays the low value (for a Financial Series series).
{OV} Displays the open value (for a Financial Series series).
{CV} Displays the close value (for a Financial Series series).

You can also use standard and custom format specifiers, together with the placeholders to format numeric and date/time values (e.g., {V:F1}).

The following image shows this property in action with the "{}{A}: {V:F1}" pattern.

SeriesLabels_TextPattern

See Also