Use the numberFormat tag to specify formatting for numeric values.
The numberFormat tag can be a child of any of the following graph tags:
The numberFormat tag can be a child of any of the following gauge tags:
The numberFormat tag can have the following child tag: af:convertNumber.
The following example shows XML for a numberFormat tag that is used to format numbers on a graph's Y1-Axis. The af:convertNumber tag specifies that the numbers should be treated as currency and should use the dollar sign symbol.
<dvt:graph>
<dvt:y1Axis lineWidth="1" lineColor="#00000" scaledLogarithmic="false" logarithmicBase="10.0"
axisMinAutoScaled="true" axisMinValue="0.0" axisMaxAutoScaled="true" axisMaxValue="60.0"
majorTickStepAutomatic="true" majorTickStep="10.0">
<dvt:numberFormat>
<af:convertNumber type="currency" currencySymbol="$"/>
</dvt:numberFormat>
</dvt:y1Axis>
</dvt:graph>
The following example shows XML for a number format tag that is used to format marker text for the graph's Y1-Axis. Numbers should be followed by a sign.
<dvt:graph>
<dvt:markerText visible="true" markerTextPlace="MTP_OUTSIDE_MAX">
<dvt:graphFont name="SansSerif" size="10" color="#000000" bold="true"
italic="false" underline="false"/>
<dvt:y1Format>
<dvt:numberFormat posNumFmt="POS_NUMFMT_NUM_POS"/>
</dvt:y1Format>
</dvt:markerText>
</dvt:graph>
| Name | Type | Supports EL? | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | java.lang.String | no | Specifies the identifier for the component | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numberType | java.lang.String | no | Specifies the kind of number to be formatted. Valid values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| thousandSeparator | char | no | Specifies the symbol to be used as the thousands separator. Any character is allowed.
Example: If a thousandSeparator is specified to be ",", then the value "1000" will be displayed as "1,000". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| decimalSeparator | char | no | Specifies the symbol to be used as the decimal separator. Any character is allowed.
Example: If a decimalSeparator is specified to be ".", then the value "1000" will be displayed as "1000.00". (Assume two decimal places are specified) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| currencySymbol | java.lang.String | no | Specifies the symbol to be used as the currency symbol. Any character is allowed.
Example: If a currencySymbol is specified to be "$", then the value "1000" will be displayed as "$1000". |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leadingZero | boolean | no | Indicates whether numbers that fall between 1.0 and -1.0 are displayed with leading zeros. Valid values are "true" (Default) and "false". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| decimalDigit | int | no | Specifies the number of decimal digits to display. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| posNumFmt | java.lang.String | no | Specifies the format for positive numbers. Valid values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| negNumFmt | java.lang.String | no | Specifies the format for negative numbers. Valid values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| posCurFmt | java.lang.String | no | Specifies the format for positive currency. Valid values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| negCurFmt | java.lang.String | no | Specifies the format for negative currency values. Valid values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaleFactor | java.lang.String | no | Specifies how much to abbreviate a number. For example, if you set ScaleFactor to SCALEFACTOR_THOUSANDS, the view displays the number as thousands, and a number such as 153,000 appears as 153K (assuming the default value of the ScaleDownThousands property and the locale is English). The number will be auto-scaled by default depending on its value.
Valid values are:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaleDownThousands | java.lang.String | no | Specifies the character or string that represents the abbreviation for thousands. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaleDownMillions | java.lang.String | no | Specifies the character or string that represents the abbreviation for millions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaleDownBillions | java.lang.String | no | Specifies the character or string that represents the abbreviation for billions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaleDownTrillions | java.lang.String | no | Specifies the character or string that represents the abbreviation for trillions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| scaleDownQuadrillions | java.lang.String | no | Specifies the character or string that represents the abbreviation for quadrillions. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numberFormatString | java.lang.String | no | Specifies the Oracle format string.
|