🌍 Public
Viewing a saved revision (read-only)
a1696ea5e02b4d5e8769d5c28fa2e074
Project 1 — Bar Chart
A bar chart displays aggregated values by category, with interactive controls that let users choose the categorical and numeric columns to visualize. The chart loads data from a local CSV file using `d3.csv` with `d3.autoType` to infer column types, then builds a sorted bar layout. The D3 v7 code uses `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, grid lines via `d3.axisLeft`, and tooltips that follow the mouse. The bars are filled with a blue color, and axes are automatically labeled and rotated for readability.
AI-generated description