Skip to main content
100%

Let's make a Bar Graph with D3.js

✓ Published1🌍 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
MIT Licensed

Similar vizzes