.dcss-precision-fixed
Tells you how many decimals a fixed format needs to tell steps of a given size apart.
Example
Result
Markup
<link rel="stylesheet" href="dcss.css">
<link rel="stylesheet" href="families/array.css">
<link rel="stylesheet" href="families/format.css">
<div class="dcss-precision-fixed" style="--step: 0.01">
<output class="dcss-format-fixed" style="--value: var(--dcss-precision-fixed); --precision: 0"></output>
</div>
Browser support
| Browser | Support |
|---|---|
| Chrome | Yes |
| Safari | Yes |
| Firefox | Whole numbers only |
See also
d3.precisionFixedin d3’s documentation