To enable DateTime support, you need to just set the XValue property to DateTime value. This allows date to be entered in design-time, as an example XValue="1/22/2008". However date can be set from managed code also which is shown in Managed Code Sample.
To set the XValue type of a DataSeries, a DataSeries object's XValueType property must be changed to Date, DateTime, Time or Auto. By default the XValueType property value is set to Date for DateTime values.
DateTime formatting for AxisLabels is done using the ValueFormatString property in AxisX. DateTime formatting is explained in detail later in this section.
You can set the type of Interval gap for AxisLabels, by setting an IntervalType property in AxisX. Interval and IntervalType properties are interdependent to each other. Interval property will effect only when IntervalType property is set and vice versa.
* Note: Visifire supports DateTime for AxisX only.
Date and Time Formatting
You can use custom DateTime formats for AxisLabels.
Custom Formats
Custom DateTime formats are set using specifiers. Below is a list of commonly used Custom DateTime format Strings.
|
Format Specifier |
Description |
Example |
|
dd |
Displays the current day of the month as a number |
06 |
|
ddd |
Displays the current day of the month as an abbreviated word |
Mon |
|
dddd |
Displays the current day of the month as a full word |
Monday |
|
MM |
Displays the current month as a number |
10 |
|
MMM |
Displays the current month as an abbreviated word |
Oct |
|
MMMM |
Displays the current month as a full word |
October |
|
yy |
Displays the year as an abbreviation |
08 |
|
yyyy |
Displays the full year |
2008 |
XAML Example:
<vc:Axis ValueFormatString="ddd">
Related Links:
For more info, refer to Custom Date and Time Format Strings.
See Also:
XAML Sample