XY Chart NET 3 Control Reference
DateTime

DateTime feature allows the display of date and/or time values to be formatted on any x or y-axis.  The DateTime data format is implemented as a floating-point value (double), measuring days from midnight, December 30, 1899.  So, midnight, December 31, 1899 is represented by 1.0.  Similarly, 6 AM, January 1, 1900 is represented by 2.25.

XY Chart Net uses Microsoft's set of user-defined date/time format characters.  A complete list of Custom DateTime Format Strings can be found in Microsoft's MSDN library, NET Framework Developer's Guide. 

Example

For a value of 38045.444445868056, the format strings below yield the following results:

Format String Result
h:mm:ss 9:40:00
hh:mm:ss 09:40:00
hh:mm:ss.fff 09:40:00.123
hh:mm:ss.fff tt 09:40:00.123 AM
M/d/yy 2/28/04
dd-MMM-yyyy 28-Feb-2004
MMMM dd, yyyy hh:mm:ss.fff tt February 28, 2004 09:40:00.123 AM
To Enable Feature

Programmatically set the X-Axis and/or Y-Axis Scale property to configure and enable this feature. Set FormatStyle to DateTime and then set the DateTimeFormat string.

Show/Hide Weekends

Use DateIncludeWeekends property to specify whether a scale, using the DateTime format, should display weekends (Saturdays and Sundays).  By default, all DateTime scales displays all days of the week. A combination of Daily, Weekly, Monthly, Quarterly, and Yearly profiles may be plotted against the same scale regardless of this property setting.

Refer to Sample 9 for an example of how to use this property.

 

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.