NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2424 most downloaded on npm
Displays automatic reference lines for scales.
Last release 5 years ago
no release in 18 months
Ships unpredictably
gaps range from 1 weeks to 1.9 years
Most releases are documented
notes for 21 of 27 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
28 releases · first in 2016
Fix axis .tickArguments to accept an iterable. #77
This package now requires Node.js 12 or higher. For more, please read Sindre Sorhus’s FAQ.
Only offset the axis by 0.5px on low-resolution devices (devicePixelRatio ≤ 1).
One column per quarter.
Mark the package as having no side effects. Thanks, @stof ! #61
This release adopts ES2015 language features such as for-of and drops support for older browsers, including IE. If you need to support pre-ES2015 environments, you should stick with d3-axis 1.x or use a transpiler.
Nothing published for this version
Update dependencies.
Update dependencies.
Fix for outer tick size of zero.
Use currentColor instead of black.
Fix rendering when a scale has a non-numeric range. ( d3/d3-scale#107 )
Fix tick offset for band and point scales.
v1.0.6 Compare # Choose a tag to compare
v1.0.6
Compare
Fix invalid transforms when an ordinal axis transition is interrupted.
Nothing published for this version
Add module entry point to package.json.
module entry point to package.json.Fix crisp edges for band scales with odd bandwidths.
Nothing published for this version
To render axes properly in D3 3.x, you needed to style them:
To render axes properly in D3 3.x, you needed to style them:
<style>
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.axis text {
font: 10px sans-serif;
}
</style>
<script>
d3.select(".axis")
.call(d3.svg.axis()
.scale(x)
.orient("bottom"));
</script>
If you didn’t, you saw this:
<img src="https://raw.githubusercontent.com/d3/d3/master/img/axis-v3.png" width="100%" height="105">
D3 4.0 provides default styles and shorter syntax. In place of d3.svg.axis and axis.orient, D3 4.0 now provides four constructors for each orientation: d3.axisTop, d3.axisRight, d3.axisBottom, d3.axisLeft. These constructors accept a scale, so you can reduce all of the above to:
<script>
d3.select(".axis")
.call(d3.axisBottom(x));
</script>
And get this:
<img src="https://raw.githubusercontent.com/d3/d3/master/img/axis-v4.png" width="100%" height="105">
As before, you can customize the axis appearance either by applying stylesheets or by modifying the axis elements. The default appearance has been changed slightly to offset the axis by a half-pixel; this fixes a crisp-edges rendering issue on Safari where the axis would be drawn two-pixels thick.
There’s now an axis.tickArguments method, as an alternative to axis.ticks that also allows the axis tick arguments to be inspected. The axis.tickSize method has been changed to only allow a single argument when setting the tick size; use axis.tickSizeInner or axis.tickSizeOuter to set the inner and outer tick size separately.
See CHANGES for all D3 changes since 3.x.
Draw the ticks over the domain path, rather than _vice versa_.
Export to the global d3 in vanilla environments (d3/d3#2840).
d3 in vanilla environments (d3/d3#2840).Improve the default appearance.
- Upgrade to d3-scale 0.7 (#6).
Nothing published for this version
Nothing published for this version
Nothing published for this version
Update d3-selection dependency.
More concise axis construction.
Add axisTop, axisRight, axisBottom, axisBottom.
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →