Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

1cd2680d915b4db8bf5f0077917702e5

Making a Bar Chart

0 stars0🌍 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