Skip to main content

DateTimeOptions.FormatString Property

Gets or sets the pattern for formatting date-time values.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

[NonTestableProperty]
[XtraSerializableProperty]
public string FormatString { get; set; }

Property Value

Type Description
String

A String value that represents the format pattern.

Property Paths

You can access this nested property as listed below:

Object Type Path to FormatString
PointOptions
.ArgumentDateTimeOptions .FormatString
PointOptions
.ValueDateTimeOptions .FormatString
SimplePointOptions
.ValueDateTimeOptions .FormatString

Remarks

When the DateTimeOptions.Format property is set to Custom, use the FormatString property, to specify a custom format for the date-time options (of axis labels, series point labels or the legend).

The following image demonstrates implementation of a quarterly formatting for the X-axis’ labels.

FormatString_Quarter

And, a monthly format is depicted below.

DateTimeFormat_Custom

Standard date-time format specifiers for composing various format patterns are described in the Date and Time Format Strings topics in MSDN.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FormatString property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also