Skip to main content
100%

Brush Handles d3v4 II

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 3, 2018
Created on Sep 3, 2018

This example demonstrates a D3 v4 brush with custom resize handles on a scatterplot of 800 random points. The brush selects a horizontal range along the x-axis, highlighting points within the selection by adding an “active” class. Custom path-based handles replace the default brush edges, using a `brushResizePath` function to draw arrow-like grips. The code uses `d3.brushX`, `d3.axisBottom`, and `d3.scaleLinear`, with the brush’s `start`, `brush`, and `end` events driving the highlighting logic via `d3.event.selection`.

AI-generated description

Froked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/4349545'>Brush Handles</a> (now in d3v4).

See issue #14 and crossfilter.

forked from <a href='http://bl.ocks.org/Fil/'>Fil</a>'s block: <a href='http://bl.ocks.org/Fil/2d43867ba1f36a05459c7113c7f6f98a'>Brush Handles d3v4 II</a>

gpl-3.0 Licensed

Similar vizzes