Skip to main content
100%

D3 Brush and Tooltip Complete

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 9, 2017
Created on Mar 9, 2017

This example shows a scatterplot of 49 random data points where users can brush-zoom over the chart and see tooltips with each point’s X and Y values. The chart uses D3 v3 with SVG circles, linear scales, and axes. Brushing is implemented via `d3.svg.brush()` applied to the background, while a custom `d3.helper.tooltip()` creates and moves an HTML tooltip on mouseover and mousemove. Brush events highlight selected points by toggling a CSS class, and a clear button resets the selection.

AI-generated description

Example for Cooperative Brushing and Tooltips in D3.

The completed chart, with both tooltips and brushing working cooperatively. You can start a brush-zoom on either the background or a data point.

forked from <a href='http://bl.ocks.org/wrobstory/'>wrobstory</a>'s block: <a href='http://bl.ocks.org/wrobstory/7612013'>D3 Brush and Tooltip Complete</a>

mit Licensed

Similar vizzes