XYSeries2D.CrosshairLabelPattern Property
Gets or sets a string which represents the pattern specifying the text to be displayed within a crosshair label for the current XYSeries2D type.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v14.2.dll
#Declaration
#Property Value
Type | Description |
---|---|
String | A String that is a crosshair label pattern. The default value is Empty. |
#Remarks
Use the CrosshairLabelPattern property to define a display pattern that determines the text to be displayed in crosshair labels for a particular XYSeries.
For example, the following image shows two crosshair label patterns: "{S}: {A} - {V}" for the first Line Series, and {A:V} for the second Line series:
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). |
To learn more on a crosshair cursor, see the Crosshair Cursor topic.
#Examples
This example demonstrates changing a text displayed in crosshair labels using crosshair format patterns.
To accomplish this, it is necessary to specify a string which will represent a displayed pattern within a crosshair label using the CrosshairAxisLabelOptions.Pattern, XYSeries2D.CrosshairLabelPattern, and CrosshairOptions.GroupHeaderPattern properties.
In addition, standard and custom format specifiers are used together with the placeholders to format numeric and date/time values (e.g., {A:F0}).
To learn more on a crosshair cursor, see the Crosshair Cursor topic.