xmCHART 3.4 Reference
Last updated: 2010-06-05

Number format specifiers back functions constants

General structure "[string] | [+][power]specifier precision | [string]"

Format specifiers are to be placed in vertical bars (|). Leading and trailing texts can be attached as an option.

The decimal point character can be changed with the function SetDecimalPoint(), for example: By using the function SetDecimalPoint(",") the number 0.00123 is formatted as 0,00123.

A thousands separator can be inserted with the function SetThousandsSep(), for example: By using the function SetThousandsSep(",") the number 1234567 is formatted as 1,234,567.
     
Specifiers u Default format. (max. 6 digits)
  i Integer format.
  f Floating point format.
  e/E Scientific notation.
  g/G Scientific notation is used if the exponent is less than -4 or greater than or equal to the precision; otherwise f-format is used.
  h/H Engineering notation. (Engineering notation shows all exponents in multiples of three).
precision 0..9 (required, except for u-format)
+ + Number always displayed with a sign. (optional)
power -9..9 Multiply number by 10th power. (optional)
     
examples    
1234.5678 "|u|" 1234.57
  "|f5|" 1234.56780
  "|f4|" 1234.5678
  "|f3|" 1234.568
  "|f2|" 1234.57
  "|f1|" 1234.6
  "|f0|" 1235.
  "|i0|" 1235
  "|i1|" 1230
  "|i2|" 1200
  "|i3|" 1000
  "|i4|" 0
     
  "|2f1|" 123456.8
  "|-2f3|" 12.346
  "|+f1|" +1234.6
  "|+-2f1|" +12.3
     
  "|e3|" 1.235e+03
  "|+1E3|" +1.235E+04
12345.678 "|+H1|" +12.3E+03
0.00000012345678 "|g4|" 0.1235e-06
0.00012345678 "|g6|" 0.000123
     
0.12345 "|2f1|%" 12.3%
1234567.89 "|-6f2| Mill $" 1.23 Mill $
12.3456 "(|+f2|)" (+12.35)

©2010 X2max Software back functions constants