Making a Bar Chart
✓ Published0🌍 Public
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 descriptionMIT Licensed