Chart primitives
Layouts & specialized
Interactions
Data utilities
Umbrella package
@vx/brush
A brush allows you to select a sub-region of your chart or axis.
Installation
npm install --save @vx/brush
Examples
<Brush />
Components
APIs
#<Brush />
Allowed directions for Brush dimensional change.
Default horizontal
What is being brushed, used for margin subtraction.
Default chart
Whether movement of Brush should be disabled.
Default false
Size of Brush handles, applies to all resizeTriggerAreas
.
Default 4
Brush stage height.
Default 0
Initial start and end position of the Brush.
Margin subtracted from Brush stage dimensions.
Default {
top: 0,
left: 0,
right: 0,
bottom: 0,
}
Callback invoked on mouse up when a Brush size is being updated.
Callback invoked on initialization of a Brush (not Brush move).
Callback invoked on a change in Brush bounds.
Callback invoked on Brush stage click.
Callback invoked on mouse leave from Brush stage when not dragging.
Callback invoked on mouse move in Brush stage when not dragging.
Whether to reset the Brush on drag end.
Default false
Array of rect sides and corners which should be resizeable / can trigger a Brush size change.
Default ['left', 'right']
Style object for the Brush selection rect.
Default {
fill: DEFAULT_COLOR,
fillOpacity: 0.2,
stroke: DEFAULT_COLOR,
strokeWidth: 1,
strokeOpacity: 0.8,
}
Brush stage width.
Default 0
Orientation of xAxis if brushRegion=xAxis
.
Default bottom
x-coordinate scale.
Orientation of yAxis if brushRegion=yAxis
.
Default right
y-coordinate scale.