Skip to main content
100%

Making a Bar Chart

✓ Published0🌍 Public
Mmeghagoyal17
Last edited Apr 12, 2023
Created on Apr 11, 2023
Forked from HTML Starter

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
MIT Licensed

Similar vizzes