ComponentOne Chart 8.0 for ActiveX
Format Codes

 

Format Codes

The following lists and describes the valid format codes you can use in a format specification.

#0?

Creates a placeholder for a number. Use with . (period) code to specify the number of digits to display. # does not display extra zeros. 0 displays extra zeros when there are fewer digits than in the format. ? works like 0 and adds space for insignificant zeros to align decimal points and fractions. For example, “#.0#” formats 16 as 16.0, and 98.666 as 98.67.

. (period)

Positions the decimal point, used with #, 0, and ? to specify the number of digits and rounding. For example, “###.0000” formats 123.45 as 123.4500.

, (comma)

When between digits, acts as a thousands separator. When at the end of a value, divides value by a thousand. For example, “#,###” formats 21000 as 21,000. “0.0,” formats 12000 as 1.2.

$-+/()

Inserts character where it appears in the format. For example, “$#.00” formats 23.3 as $21.30.

\ <character>

Inserts <character> where it appears in the format. For example, “\%” inserts a percent sign (without multiplying).

_<character>

Inserts a space the width of <character>. For example, “_-” displays a space the width of the minus sign.

%

Multiplies value by 100 and inserts % character. For example, “#.##%” formats .85 as 85%.

[multiplier <n>]

Multiplies following value by <n>. For example, “[multiplier 1.6]” formats 10 as 16.

E+ e+ E- e-

Converts value to scientific notation, placing “E” or “e” in front of the exponent. E+ and e+ displays “+” before positive exponents and “-” before negative exponents. E- and e- only displays “-” before negative exponents. For example, “0.0E+00” formats 18987 as 1.8E+04.

*<character>

Pads the annotation space with <character>. For example, “$* ##.##” displays as much space as possible between the $ and value.

[Black] [White] [Red] [Green] [Blue] [Magenta] [Yellow] [Cyan] [<named color>] [COLOR=<value>]

Sets the color of following value or formats. <named color> specifies a ComponentOne Chart named color string. Use <COLOR=<value> to specify an RGB color reference.

[height <n>]

Sets the font size of the value or formats that follow. <n> represents the # of logical units. For example, “0[height 50%].00[height 100%]” formats 75.5 as (75 .50 ).

[align <value>]

Sets the vertical position of the value or formats that follow. Only effective when used with the [height] code. <value> is top, bottom, center, baseline, or top(x). When top(x), x specifies the only character for which the alignment is used. For example, “0.0[height 75%][align top(0)]E+00” formats 100 as 1.0E+02 .

[hide] [show]

[hide] hides the value or formats that follow. [show] turns off format/value hiding. For example, “0.0[hide]E[show]+00” formats 70 as 7.0+01.

; (semicolon)

Ends one group and begins a format group. For example, “#.##%” formats .85 as 85%.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback