Documentation › Charts
Number and date formatting
Format numbers, shillings, percentages and dates in Embiro BI charts with the built-in presets or your own D3 format strings.
Wherever a chart shows numbers, the Customize tab (or the metric's own settings) has a format control: Number format, Y Axis Format, D3 Format or similar. Pick a preset or type your own format string.
Common formats
| You want | Format | 1234567.891 shows as |
|---|---|---|
| Thousands separators, no decimals | ,d |
1,234,568 |
| Two decimals | ,.2f |
1,234,567.89 |
| Short with M, k, G | .3s |
1.23M |
| Short, one significant digit | .1s |
1M |
| Adapts to the value | SMART_NUMBER |
1.23M |
| Always show the sign | +,d |
+1,234,568 |
| Original value | ~g |
1234567.891 |
Percentages: store them as fractions (0.256) and use .1% (25.6%) or ,.2% (25.60%). If your column already holds 25.6, use ,.1f and write "%" in the title.
Shillings and other currencies
You have two ways to show UGX amounts:
- Currency format (in Customize, or on a dataset metric): choose UGX and the symbol's position. Values then show as
UGX 1,234,568. On a dataset metric it applies everywhere the metric is used. - A number format with the unit in the title:
,dand the title Revenue (UGX), or.3sand Revenue (UGX) for compact labels such as1.23M.
Millions on axes
Large shilling amounts make axis labels long. Use .3s on the axis (1.23M, 450k) and ,d in tooltips and tables, where the exact figure matters.
Duration, size and distance
| Format | Input | Shows |
|---|---|---|
DURATION |
milliseconds 66000 |
1m 6s |
DURATION_COL |
milliseconds 10500 |
0:00:10.5 |
MEMORY_DECIMAL |
bytes 1024 |
1.024kB |
MEMORY_BINARY |
bytes 1024 |
1KiB |
LENGTH |
metres 12345 |
12.35km |
LENGTH_CM_M |
centimetres 12345 |
123.45m |
Your own format string
Type any D3 format string into the control. The pattern is [sign][,][.precision][type]:
,adds thousands separators;.2sets the precision;ffixed decimals,dwhole numbers,%percentage,sSI prefix (k, M, G),eexponent.
Dates
Date and time columns have a Date format or Time format control (in tables, on axes and in tooltips):
| Format | Shows |
|---|---|
smart_date |
Adapts to the grain: Mar 2026, 14 Mar, 09:30 |
%Y-%m-%d |
2026-03-14 |
%d/%m/%Y |
14/03/2026 |
%d %b %Y |
14 Mar 2026 |
%B %Y |
March 2026 |
%b %y |
Mar 26 |
%Y-%m-%d %H:%M |
2026-03-14 09:30 |
The codes follow d3-time-format: %Y year, %m month number, %b short month name, %B full month name, %d day, %H:%M hours and minutes, %a weekday.
Something unclear or missing? Tell us and we'll improve this page.