d3-scale provides encodings that map abstract data dimensions to visual representations. It is useful in data visualization for converting data into visual channels such as position, color, stroke width, or symbol size, including support for categorical and discrete data.
Project status
- The source has updated very recently, with an upstream push on November 3, 2026, but this follows a gap of more than five years since the previous listed update.
- The apparent cadence is highly irregular: updates were clustered from 2019 to 2021, then quiet until the latest update. There is not enough evidence to call it consistently active.
AI summary generated
Recent updates
v4.0.3
d3-scale v4.0.3 updates its build, test, and publishing toolchain, and changes the published package to use a bundled ES module entry point. It also fixes diverging scales for null input and adjusts time-scale millisecond rounding, with an additional domain-rounding behavior change visible in the code.
BreakingSecurityFeaturesv4.0.2
v4.0.2 changes the default formatting used by d3-scale log ticks for base-10. The behavior switches from scientific notation to an SI-prefix style output, and the test suite expectations are updated accordingly.
Breakingv4.0.1
v4.0.1 is a patch release focused on the log scale implementation. It fixes log tick generation to return exact values for integer bases and adjusts log.tickFormat to trim trailing zeros by default when precision is not explicitly specified.
v4.0.0
v4.0.0 updates d3-scale to modern ESM usage and bumps several dependencies, including switching the ordinal scale implementation to use InternMap. The release notes also mention reproducible builds and a new Node.js requirement (12+).
Breakingv3.3.0
v3.3.0 updates d3-scale to use d3-time tick generation utilities (timeTicks/utcTicks) for Date/UTC time scales. The release notes only mention adopting those tick helpers, but the code change also refactors the internal calendar implementation and alters how tick intervals are computed and handled.
v3.2.4
v3.2.4 updates d3-scale so that passing null into quantitative scale functions is treated as an unknown value rather than being coerced and processed. The change is implemented across multiple scale types by adding an explicit null check before the existing NaN/number-orderability logic.
v3.2.3
v3.2.3 primarily targets a performance regression related to d3.scaleQuantile. The code change swaps the underlying quantile computation to use d3-array’s optimized path, and the release also upgrades d3-array via dependency range changes.
v3.2.2
d3-scale v3.2.2 includes a fix to how continuous scales compute “nice” domains so that the resulting niced domain spans the generated ticks. The release also updates d3-* dependencies, and adds/adjusts tests related to linear ticks and nice behavior.
v3.2.1
v3.2.1 contains a fix for d3-scale log tick generation on small domains and updates the d3-interpolate dependency. The code changes also reveal a broader set of transitive d3 dependency upgrades via yarn.lock, and a more specific tick selection heuristic in src/log.js.
v3.2.0
d3-scale v3.2.0 adds new convenience APIs for scale range and interpolation setup. It introduces rangeRound support for sequential and diverging scales, adds sequentialQuantile.quantiles, and extends scaleSequential and scaleDiverging to accept a range array in place of an interpolator factory.
Featuresv3.1.0
This release (v3.1.0) adds the new d3.scaleRadial scale and extends sequential scales with a range method for axis compatibility. It also includes multiple fixes related to tick generation for log scales on small domains, clamp behavior across continuous and quantile scales, and diverging scales with descending domains.
Features