Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Making a Bar Chart with D3.js

Public visualization

Making a Bar Chart with D3.js

0 stars0๐ŸŒ Public
GGS500
Last edited Oct 16, 2020
Created on Oct 16, 2020

This example demonstrates a basic bar chart built with D3.js, mapping country populations from a CSV file to SVG rectangles. The code uses `d3.csv` to load the data, `d3.scaleLinear` for scaling, and `selection.enter()` to append rectangular elements. The chart reads the data.csv file, multiplies population values by 1,000, and renders static 300-by-300-pixel bars without axes or labels.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed