Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
PPaolaAntonicoli
Last edited Feb 22, 2022
Created on Feb 7, 2022

This example shows a bar chart of monthly incident counts, sorted by month from January through December. The code uses D3's `scaleLinear` and `scaleBand` to map incident values to bar widths and month labels to vertical positions, with `axisLeft` and `axisBottom` for the chart axes. Data is loaded asynchronously from a CSV file via `csv()`, and rendered as SVG rectangles within a 960x500 canvas. The visualization is built in a React environment, with styles defined in an external CSS file.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes