Skip to main content
100%

Area Chart with Brushing

✓ Published0🌍 Public
BBrightPeace
Last edited Feb 29, 2020
Created on Feb 29, 2020

This example presents an area chart of monthly price data from January 2000 through March 2010, rendered as an SVG with a main focus chart and a smaller context panel beneath it. The visualization demonstrates linked brushing: users can select a range on the context panel with a brush, which zooms the focus chart to that time period. The code uses d3’s scaleTime, scaleLinear, area, and brushX APIs, with axes generated by axisBottom and axisLeft. The interactive brushing triggers a zoom by re-computing the x-domain and redrawing the focus area and axis.

AI-generated description
MIT Licensed

Similar vizzes