Documentation menu
Format Object
Number format object is used for defining number formatting in the component.
Properties
Name | Type | Description |
---|---|---|
name | String | Should be unique because each format is identified by name. The default value is "" . The default number format is applied to the measures for which no specific number format exists. |
thousandsSeparator | String | Symbol used as a thousand separator. The default value is " " (space). |
decimalSeparator | String | Symbol used as a decimal separator. The default value is "." . |
decimalPlaces | Number | Defines the number of decimals to appear after decimal separator in the fractional part of the number. The default value is -1 , it means the number will not be changed and it will be shown in its original form. |
maxDecimalPlaces | Number | Defines the maximum number of decimals to appear after decimal separator in the fractional part of the number. The default value is -1 , it means the number will not be changed and it will be shown in the original form. |
maxSymbols | Number | Defines the maximum amount of symbols that can be displayed in a cell. The default value is 20 . |
currencySymbol | String | Symbol which appears near the value (hours, percent, currency symbol etc.). The default value is "" . |
currencySymbolAlign | String | Defines the positioning of a currency symbol. It could be either "left" or "right" . The default value is "left" . |
isPercent | Boolean | Enables formatting data in percentage form. The behavior is similar to MS Excel. The default value is false . When setting isPercent to true , the numbers will be multiplied by 100 and % symbol will be appended to the result. For example, 0.42 will be converted to 42% . An important thing to note is if currencySymbol is set as % then setting the value of isPercent to true will not multiply the result by 100. |
nullValue | String | Specifies the format of null values on the grid. The default value is "" . |
infinityValue | String | Specifies the format of infinity values on the grid. The default value is "Infinity" . |
divideByZeroValue | String | Specifies the format of values divided by zero. The default value is "Infinity" . |
textAlign | String | Defines the positioning of formatted values in cells on the grid. The alignments are "right" or "left" . The default value is "right" . |
Example
Set default number formatting: