IntervalTimeSpanScaleOptions.Pattern Property
Gets or sets a format string that configures text for the axis label and crosshair label.
Namespace: DevExpress.Xpf.Charts
Assembly: DevExpress.Xpf.Charts.v24.2.dll
NuGet Package: DevExpress.Wpf.Charts
Declaration
Property Value
Type | Description |
---|---|
String | A format string. |
Remarks
This pattern is applied when TimeSpanScaleOptionsBase.GridLayoutMode is set to GridAndLabelCentered or GridShiftedLabelCentered. Otherwise, use the AxisLabel.TextPattern property.
Patterns can contain regular text (displayed as is) and value placeholders in braces. You can apply Format Specifiers to placeholder values. Use a colon to separate a placeholder and its format specifier.
The following table contains the available placeholders:
Placeholder | Description |
---|---|
{OB} | Displays an opening bracket. |
{CB} | Displays a closing bracket. |
{OS} | Displays the greater than sign. |
{US} | Displays the less than or less than or equal to sign. |
{A1} | Displays the interval start value. |
{A2} | Displays the interval end value. |
Example
This example shows how to display intervals on the x-axis:
The example uses the following API members:
Member | Description |
---|---|
IntervalTimeSpanScaleOptions | Stores options for the time-span x-axis whose scale is divided into intervals. |
ManualTimeSpanScaleOptions.AggregateFunction | Gets or sets the function that is used to aggregate time-span data associated with the axis. |
OverflowValue | Gets or sets the overflow interval’s start value. |
UnderflowValue | Gets or sets the underflow interval’s end value. |
Pattern |
Gets or sets a format string that configures text for the axis label and crosshair label. |
OverflowValuePattern | Gets or sets a format string that configures text for the overflow interval axis label and crosshair label. |
UnderflowValuePattern | Gets or sets a format string that configures text for the overflow interval axis label and crosshair label. |
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D>
<dxc:AxisX2D.TimeSpanScaleOptions>
<dxc:IntervalTimeSpanScaleOptions AggregateFunction="Average"
Pattern="{}{A1:dd\.hh\:mm}-{A2:dd\.hh\:mm}"
UnderflowValue="0.06:00:00"
UnderflowValuePattern="{}{US}{A2:hh\:mm}"
OverflowValue="1.12:00:00"
OverflowValuePattern="{}{OS}{A1:dd\.hh\:mm\:ss}"/>
</dxc:AxisX2D.TimeSpanScaleOptions>
</dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>