TP3
✓ Published0🌍 Public
AAlxClt
Last edited Feb 1, 2018
Created on Jan 31, 2018
This example shows a stacked bar chart of average monthly stock prices for four companies over eleven years, with a click interaction that toggles between stacked and grouped modes. The bars animate smoothly between the two layouts using chained `transition` calls. It uses D3 v4’s `d3.nest()` to aggregate the CSV data, `d3.stack()` for stacking, and `d3.scaleBand`/`d3.scaleLinear` for positioning. The SVG rectangles transition their `x`, `y`, `width`, and `height` attributes over time.
AI-generated descriptionBuilt with blockbuilder.org
mit Licensed