Numeric Display Format
Summary
- AdapTable provides a number of Display Formats to be used with Numeric Columns
AdapTable ships with a number of System Number Display Formats.
These are designed to provide Display Formats for numeric columns.
They are contained in the Number Formatter object defined as follows:
| Property | Description |
|---|---|
| Abs | Returns absolute value of cell value |
| Ceiling | Returns smallest integer greater than cell value |
| Content | Replaces cell value with supplied value (that can contain Template Literals) |
| Empty | Show nothing in cell (but underlying value remains) |
| Floor | Returns largest integer cell value |
| FractionDigits | Number of digits to show in Fractions (up to 20) |
| FractionSeparator | Separator to use in fractions |
| IntegerDigits | Number of digits to show for Integers (up to 20) |
| IntegerSeparator | Separator to use in Integers |
| Multiplier | Multiplier to use on cell value |
| Parentheses | Shows negative numbers in parentheses |
| Prefix | Prefix to use before cell value |
| Round | Rounds cell value |
| Suffix | Suffix to use after cell value |
| Truncate | Truncates cell value |
Numeric Presets
AdapTable provides 5 preset numeric formatters in the Format Column Wizard.
These are designed to help users easily create Display Format for the more common use cases:
| Numeric Preset | Raw Value | Display Format |
|---|---|---|
| Percentage | 0.54321 | 54.32% |
| K (Thousand) | 123456 | 123.456K |
| M (Million) | 123456789 | 123.456789M |
| Dollar | 123.4567 | $123.46 |
| Sterling | 123.4567 | £123.46 |
Column Formatting: Numeric Display Formats
- This example shows 3 Display Formats on Numeric columns:
Open/Total Issues, a Calculated Column, has a suffix of%and is limited to 2 decimal placesIssue Changeis given a negative parentheses formatGitHub Starshas a K for 1000 format