🌍 Public
Viewing a saved revision (read-only)
1cd2680d915b4db8bf5f0077917702e5
Making a Bar Chart
This example shows a simple bar chart built with D3.js v7, displaying four individuals’ scores against a 100-point axis. Blue rectangles are positioned using a band scale for the x-axis and a linear scale for the y-axis. The code renders SVG elements via `d3.select` and `join`, with axes generated by `d3.axisBottom` and `d3.axisLeft`. Data is hardcoded as an array of objects, and the chart includes margins and a viewBox for responsive sizing.
AI-generated description