Improved auto-completion engine for formatting parameters and added support for absolute value in number formatting.
This commit is contained in:
@@ -330,6 +330,7 @@ Formats numbers, currencies, and percentages.
|
||||
| `decimal_sep` | string | `"."` | Decimal separator (e.g., ".", ",") |
|
||||
| `precision` | int | `0` | Number of decimal places |
|
||||
| `multiplier` | number | `1` | Multiply value before display (e.g., 100 for %) |
|
||||
| `absolute` | boolean | `False` | Display absolute value (no sign) |
|
||||
|
||||
**Examples:**
|
||||
|
||||
@@ -349,6 +350,10 @@ column rate:
|
||||
# Large numbers with thousands separator
|
||||
column population:
|
||||
format.number(thousands_sep=",", precision=0)
|
||||
|
||||
# Absolute value - display variance without sign
|
||||
column variance:
|
||||
format.number(absolute=True, suffix=" €", precision=2)
|
||||
```
|
||||
|
||||
#### Date Formatter
|
||||
@@ -1085,6 +1090,14 @@ DaisyUI 5 color presets:
|
||||
|
||||
### Formatter Types
|
||||
|
||||
Possible formatter types :
|
||||
- `number`
|
||||
- `date`
|
||||
- `boolean`
|
||||
- `text`
|
||||
- `enum`
|
||||
- `constant`
|
||||
|
||||
#### Number Formatter
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
@@ -1095,6 +1108,7 @@ DaisyUI 5 color presets:
|
||||
| `decimal_sep` | string | `"."` | Decimal separator |
|
||||
| `precision` | int | `0` | Decimal places |
|
||||
| `multiplier` | number | `1` | Multiply before display |
|
||||
| `absolute` | boolean | `False` | Display absolute value (no sign) |
|
||||
|
||||
#### Date Formatter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user