Numbers that appear in a tooltip can be formatted so they are clearer to the reader. This is done by defining a special syntax after an inserted attribute:
{{feature}.{value}:<format>}
Where <format> is replaced by the desired “format option”. Note, the < and > characters are not needed.
The available format options are detailed in How to format values
Some examples:
| Summary | Tooltip template | Result |
|---|---|---|
| Unformatted | {{feature}.{value}} | ![]() |
| Using built-in format | {{feature}.{value}:format} | ![]() |
| Using custom format (3s.f., using SI suffixes) | {{feature}.{value}:.3s} | ![]() |
How to use local currency formatting
To write a currency of your choice, we recommend using the applicable D3 format option and writing the symbol next to the attribute, outside of the brackets.
For example:
| Summary | Tooltip template | Result |
|---|---|---|
| Formatting Euros | {{feature}.{value}:,.2f}€ | ![]() |
| Formatting Dollars | ${{feature}.{value}:,.2f} | ![]() |




