🌍 Public
Viewing a saved revision (read-only)
044ce8330d52464a93a0d4bc85afd219
Revenue Bar Chart w/ transition
A dropdown menu lets viewers toggle between revenue and profit for seven months of data, updating a bar chart with smooth transitions. The chart uses D3 v7’s `scaleBand` and `scaleLinear` axes, with bars rendered as SVG `rect` elements. Changing the selection triggers a `transition` that animates bar heights and positions, while the exit state briefly turns bars red before removal.
AI-generated descriptionA demonstration of how to start using D3 version 6.