Returns a formatter function for the given D3-style specifier string.
Supported: [,][.precision][~][type]
f — fixed decimal (default precision 6)
% — percentage ×100 (default precision 6)
s — SI prefix (k M G T …); precision = significant figures (default 3)
e — exponential notation
d — integer (rounds to nearest)
g — significant digits via toPrecision
, — thousands separator
~ — trim trailing zeros
Returns a formatter function for the given D3-style specifier string.
Supported: [,][.precision][~][type] f — fixed decimal (default precision 6) % — percentage ×100 (default precision 6) s — SI prefix (k M G T …); precision = significant figures (default 3) e — exponential notation d — integer (rounds to nearest) g — significant digits via toPrecision , — thousands separator ~ — trim trailing zeros