Making a Bar Chart
✓ Published1🌍 Public
This example demonstrates how a bar chart can transition between datasets using D3.js version 6. It fetches vehicle registration data from the RDW Open Data API, counts cars by color per year, and displays the most popular colors for 2017. Users toggle between 2016 and 2017 datasets via radio buttons, triggering animated updates with `transition()` and `duration()`. The chart uses `d3.scaleBand` and `d3.scaleLinear` for axes, with an SVG rendering approach and a button-based interaction pattern.
AI-generated descriptionMIT Licensed