Skip to main content
100%

d3 Updating Bar Chart With Dropdown

✓ Published3🌍 Public
Rremyapk
Last edited Mar 27, 2020
Created on Mar 27, 2020
Forked from HTML Starter

The visualization displays a bar chart of nutritional values for cereals, sourced from the cereals.csv dataset. A dropdown menu lets the user select a specific cereal, which triggers the chart to update its bars with that cereal's data. The code uses d3.csv to load data, d3.scale.ordinal and d3.scale.linear for axes, and d3.svg.axis for rendering. Bars update via a transition over 250 milliseconds, with the y-axis domain recalculated using d3.extent.

AI-generated description
MIT Licensed

Similar vizzes