Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Let's make a Bar Graph with D3.js

Public visualization

Viewing a saved revision (read-only)

9eb16e063bdb45dca3878782d0069454

Let's make a Bar Graph with D3.js

0 stars1🌍 Public
SSimon Hackbert
Last edited Sep 17, 2022
Created on Sep 17, 2022
Forked from D3 Starter

This example shows a horizontal bar chart of video game data, mapping each game’s maximum number of players to bar length and its release year to vertical position. The bars are rendered as SVG rectangles with a steelblue fill, using D3 v7’s `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to build the scales and axes. Data is loaded asynchronously from a CSV file via `d3.csv`, then parsed and bound to the visualization. The chart’s margins and inner dimensions are calculated explicitly to position the plotting area.

AI-generated description