An object describing how to format numeric data for a field.
Referenced by: fieldConfiguration, fieldInfo
Properties
| Property | Details |
|---|---|
| maximumFractionDigits | A number indicating the maximum number of decimal places to display. The default is 2 with minimum and maximum values as 0 and 20 respectively. |
| minimumFractionDigits | A number indicating the minimum number of decimal places to display. The default is 0. If no value is provided, the formatter will not enforce any minimum number of decimal places. There is no strict upper limit, bit it should not exceed maximumFractionDigits. |
| style | A string indicating the style of numeric formatting to use. This value will always be decimal.Valid value of this property decimal |
| type | A string that indicates the type of formatting being used. This value will always be number.Valid value of this property number |
| useGrouping | A string value indicating whether to have digit (or thousands) separator. Possible values are auto, never, and always. The default is auto and automatically adjusts for the environment's locale.Valid values:
|
Number formatting decimal - Example
Decimal number formatting with grouping and no more than 3 total digits. For example, original number = 123456.7894, formatted number with syntax below, 123,456.789 (based on a en-US locale)
{
"type": "number",
"style": "decimal",
"maximumFractionDigits": 3,
"useGrouping": "always"
}