XY Chart NET 3 Control Reference
Number Formatting

Number formatting allows different numeric formatting styles to be displayed on any x or y-axis.  XY Chart Net uses Microsoft's set of Standard Numeric Format and Custom Numeric Format Strings.  A complete list of format strings can be found in Microsoft's MSDN library, NET Framework Developer's Guide. 

Remarks

In addition to Microsoft's Standard Numeric Format strings, XY Chart NET also supports the following format names:

Format name Description
Yes/No Displays No if number is 0; otherwise, displays Yes.
True/False Displays False if number is 0; otherwise, displays True.
On/Off Displays Off if number is 0; otherwise, displays On.

If NumericFormat = "Yes/No", "True/False" or "On/Off" then the x or y-scale is in 'boolean' mode where the number of major ticks is limited to 2.  For example, in the case of "On/Off" and scale min value = 0 and max value = 1, a major tick value of zero will display "Off", and any other value > 0  will display "On".

Example

The following is taken directly from Microsoft's MSDN library.  These examples assume that the system's locale setting is English-U.S.

Format (Style) "5" formatted as "-5" formatted as "0.5" formatted as
Zero-length string ("") 5 -5 0.5
0 5 -5 1
0.00 5.00 -5.00 0.50
#,##0 5 -5 1
$#,##0;($#,##0) $5 ($5) $1
$#,##0.00;($#,##0.00) $5.00 ($5.00) $0.50
0% 500% -500% 50%
0.00% 500.00% -500.00% 50.00%
0.00E+00 5.00E+00 -5.00E+00 5.00E-01
0.00E-00 5.00E00 -5.00E00 5.00E-01
To Enable Feature

Programmatically set the X-Axis and/or Y-Axis Scale property to configure and enable this feature. Set FormatStyle to Numeric and then set the NumericFormat string to the desired format style.

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.