Gist 21cc0f29827dacf30a658ef7763c19e7
An interactive area chart displays monthly S&P 500 price data. The visualization uses a focus-and-context technique, combining a large main chart with a smaller overview panel. Users can brush a region in the context panel to zoom the focus area, or directly pan and zoom the focus chart itself. The example uses d3.brush and d3.zoom, with d3.area for the line, and d3.axisBottom and d3.axisLeft for the axes, rendering as SVG.
AI-generated descriptionCombining 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>
forked from <a href='http://bl.ocks.org/EmbraceLife/'>EmbraceLife</a>'s block: <a href='http://bl.ocks.org/EmbraceLife/7efd1f9031beecb5252e57e944e1a440'>Brush & Zoom</a>