Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Let's make a bar chart with D3.js

Public visualization

Let's make a bar chart with D3.js

1 star2๐ŸŒ Public
Llinkshady
Last edited Oct 16, 2020
Created on May 14, 2020

This example shows a bar chart of country populations from a CSV file, using D3.js v5 within a React project. The chart renders as an SVG with `rect` elements scaled by `d3.scaleLinear` for the y-axis and `d3.scaleBand` for the x-axis, alongside `d3.axisLeft` and `d3.axisBottom` for tick marks. Data is loaded asynchronously via `d3.csv`, with population values converted to thousands, and margins are applied inside a main `<g>` group.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed