🌍 Public
Viewing a saved revision (read-only)
70d3bf411d8d4668a065e230eb621868
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.