NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2563 most downloaded on npm
Select a one- or two-dimensional region using the mouse or touch.
Last release 5 years ago
no release in 18 months
Release timing varies
gaps range from 1 weeks to 1.5 years
Most releases are documented
notes for 24 of 33 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
38 releases · first in 2016
Fix undefined event during brush move. #83
This package now requires Node.js 12 or higher. For more, please read Sindre Sorhus’s FAQ.
Add event .mode . #75 Thanks, @woutervh- !
One column per quarter.
Fix missing event .sourceEvent on start events.
Change brush .on to pass the event directly to listeners.
See https://observablehq.com/@d3/mona-lisa-histogram for an example.
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-brush 1.x or use a transpiler.
Nothing published for this version
Only orphan mouse gestures (fixes #68 ; see https://observablehq.com/@d3/brush-transitions )
Expose brush .touchable . #63
Fix broken initialization of d3.dispatch.
Fix broken corner resizers. #58
Nothing published for this version
Fix default brush .filter on control-click. #57
Fix default *brush*.touchable if navigator.maxTouchPoints. #55
Fix default *brush*.extent to consider the SVG viewBox, if any. #46
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix a crash if brush selection is cleared via _brush_.move during a gesture (#15).
Add module entry point to package.json.
module entry point to package.json.Fix for brushes added directly to root SVG elements.
Replacing d3.svg.brush, there are now three classes of brush for brushing along the _x_-dimension, the _y_-dimension, or both: d3.brushX, d3.brushY, d
Replacing d3.svg.brush, there are now three classes of brush for brushing along the x-dimension, the y-dimension, or both: d3.brushX, d3.brushY, d3.brush. Brushes are no longer dependent on scales; instead, each brush defines a selection in screen coordinates. This selection can be inverted if you want to compute the corresponding data domain. And rather than rely on the scales’ ranges to determine the brushable area, there is now a brush.extent method for setting it. If you do not set the brush extent, it defaults to the full extent of the owner SVG element. The brush.clamp method has also been eliminated; brushing is always restricted to the brushable area defined by the brush extent.
Brushes no longer store the active brush selection (i.e., the highlighted region; the brush’s position) internally. The brush’s position is now stored on any elements to which the brush has been applied. The brush’s position is available as event.selection within a brush event or by calling d3.brushSelection on a given element. To move the brush programmatically, use brush.move with a given selection or transition; see the brush snapping example. The brush.event method has been removed.
Brush interaction has been improved. By default, brushes now ignore right-clicks intended for the context menu; you can change this behavior using brush.filter. Brushes also ignore emulated mouse events on iOS. Holding down SHIFT (⇧) while brushing locks the x- or y-position of the brush. Holding down META (⌘) while clicking and dragging starts a new selection, rather than translating the existing selection.
The default appearance of the brush has also been improved and slightly simplified. Previously it was necessary to apply styles to the brush to give it a reasonable appearance, such as:
.brush .extent {
stroke: #fff;
fill-opacity: .125;
shape-rendering: crispEdges;
}
These styles are now applied by default as attributes; if you want to customize the brush appearance, you can still apply external styles or modify the brush elements. (D3 4.0 features a similar improvement to axes.) A new brush.handleSize method lets you override the brush handle size; it defaults to six pixels.
The brush now consumes handled events, making it easier to combine with other interactive behaviors such as dragging and zooming. The brushstart and brushend events have been renamed to start and end, respectively. The brush event no longer reports a event.mode to distinguish between resizing and dragging the brush.
See CHANGES for all D3 changes since 3.x.
Nothing published for this version
Fix brush interaction broken in 0.2.1.
Fix for _brush_.move during an active brush gesture.
Export to the global d3 in vanilla environments (d3/d3#2840).
d3 in vanilla environments (d3/d3#2840).The selection is now slightly lighter and more opaque by default.
The selection now has a thin white stroke by default.
- Fix crash in _brush_.move.
- Fix crash in _brush_.move.
Fix reference to the current event.
By default, ignore mousedown on secondary buttons.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →