Scatterplot with brush d3 v4
A scatterplot of S&P 500 monthly prices from 2000 to 2002, rendered in SVG using D3 v4, combines a main focus chart with a smaller context chart below. The focus chart displays blue circular points for each month's closing price, with axes for date and price. The context chart provides a miniature overview of the same data, overlaid with a one-dimensional brush. Users can drag the brush horizontally to select a time range, which dynamically updates the focus chart's x-axis domain to zoom into the brushed period. A button changes the dot color to red when clicked. The example is adapted from Mike Bostock's brush work and demonstrates linked views with a time-series scatterplot.
AI-generated descriptionExample of a scatter plot with brush using d3.js v4.
Tutorial at http://www.rajvansia.com/scatterplotbrush-d3-v4.html
Adapted from https://bl.ocks.org/mbostock/34f08d5e11952a80609169b7917d4172
forked from <a href='http://bl.ocks.org/sebg/'>sebg</a>'s block: <a href='http://bl.ocks.org/sebg/581e23a26c1074b9865e878873e880b3'>Scatterplot with brush d3 v4</a>