.dcss-ascending
Compares a and b for an ascending sort, and gives −1, 0 or 1.
Example
Result
Markup
<link rel="stylesheet" href="dcss.css">
<link rel="stylesheet" href="families/array.css">
<link rel="stylesheet" href="families/format.css">
<span class="dcss-ascending" style="--a: 3; --b: 7">
<output class="dcss-format-fixed" style="--value: var(--dcss-ascending); --precision: 0"></output></span>
Browser support
| Browser | Support |
|---|---|
| Chrome | Yes |
| Safari | Yes |
| Firefox | Whole numbers only |
See also
d3.ascendingin d3’s documentation