🌍 Public
Viewing a saved revision (read-only)
4d08604bfbd64847bf7dbd439eb11f89
d3 Updating Bar Chart With Dropdown
A dropdown menu allows a user to select a year from a dataset of module codes, values, and years, triggering an animated update of a stacked bar chart displaying the total value per module. The chart, rendered as SVG, uses d3 transitions to smoothly animate the repositioning and resizing of the stacked bars and their corresponding value labels. The visualization leverages d3's `data.csv`, `scaleBand`, `scaleLinear`, `scaleOrdinal`, and `d3.stack` to process the data and generate the layered bar representation.
AI-generated descriptionStacked bar chart