Skip to main content
100%

Brush & Zoom

✓ Published0🌍 Public
AAlainRo
Last edited Oct 4, 2017
Created on Sep 26, 2017

This example combines d3-brush and d3-zoom to create a Focus + Context interface for exploring time-series data. The main chart (focus) displays the S&P 500 index as a smooth area chart, while a smaller context chart below shows the same data. Users can brush a region in the context chart to zoom the focus view, or scroll/wheel over the focus chart to pan and zoom directly. The two views stay synchronized: brushing the context updates the focus, and zooming in the focus moves the brush. The visualization uses SVG rendering with D3 v4, with axes for time and price, and a clip path to constrain the area mark.

AI-generated description

Brush & Zoom

Combining d3-brush and d3-zoom to implement Focus + Context. Another approach is to zoom to the brushed region.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/34f08d5e11952a80609169b7917d4172'>Brush & Zoom</a>

Similar vizzes