Skip to main content
100%

Making a bar chart

✓ Published0🌍 Public
JJL10897
Last edited Mar 9, 2022
Created on Mar 9, 2022

This example shows a bar chart where each data row from a CSV file is represented as a fixed 300-by-300 pixel rectangle, though no bar height or x-position mapping is applied. The code loads data with `d3.csv`, converts the `population` field to a number, and appends SVG `rect` elements using `selectAll` and `enter`. It uses `d3.select` for SVG selection and `d3.scaleLinear` (imported but not used), with data rendered as static squares rather than proportional bars.

AI-generated description
MIT Licensed

Similar vizzes