Dashboard: Formatting Currency - add new custom 'financial' currency format without abbreviations (#106604)
* Dashboard: ValueFormat - add custom 'financial' currency format without abbreviations - Add fullCurrency formatter function that displays complete numeric values - Apply performance suggestions from old PR - Add unit tests - Update documentation * remove unnecesary `true` format support
This commit is contained in:
@@ -172,14 +172,15 @@ You can further define a custom unit with specific syntax. For example, to set a
|
||||
|
||||
The following table lists the special syntax options for custom units:
|
||||
|
||||
| Custom unit | Description |
|
||||
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `suffix:<suffix>` | Custom unit that should go after value. |
|
||||
| `prefix:<prefix>` | Custom unit that should go before value. |
|
||||
| `time:<format>` | Custom date time formats type, such as `time:YYYY-MM-DD`. Refer to [formats](https://momentjs.com/docs/#/displaying/) for the format syntax and options. |
|
||||
| `si:<base scale><unit characters>` | Custom SI units, such as `si: mF`. You can specify both a unit and the source data scale. For example, if your source data is represented as milli-something, prefix the unit with the `m` SI scale character. |
|
||||
| `count:<unit>` | Custom count unit. |
|
||||
| `currency:<unit>` | Custom currency unit. |
|
||||
| Custom unit | Description |
|
||||
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `suffix:<suffix>` | Custom unit that should go after value. |
|
||||
| `prefix:<prefix>` | Custom unit that should go before value. |
|
||||
| `time:<format>` | Custom date time formats type, such as `time:YYYY-MM-DD`. Refer to [formats](https://momentjs.com/docs/#/displaying/) for the format syntax and options. |
|
||||
| `si:<base scale><unit characters>` | Custom SI units, such as `si: mF`. You can specify both a unit and the source data scale. For example, if your source data is represented as milli-something, prefix the unit with the `m` SI scale character. |
|
||||
| `count:<unit>` | Custom count unit. |
|
||||
| `currency:<unit>` | Custom currency unit. |
|
||||
| `currency:financial:<unit>` | Full format currency unit without abbreviations. Displays complete numeric values instead of scaled abbreviations (K: Thousand, M: Million, B: Billion, T: Trillion). For example, `currency:financial:$` displays `500,555` instead of `$501K`. Add `:suffix` to place the symbol after the number: `currency:financial:€:suffix` displays `500,555€`. |
|
||||
|
||||
You can also paste a native emoji in the **Unit** drop-down and select it as a custom unit:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user