Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Simple bar chart

Public visualization

Viewing a saved revision (read-only)

7e005cef881545feb92f22631d808ce9

Simple bar chart

0 stars0🌍 Public
HHuan Tran
Last edited Feb 10, 2024
Created on Feb 10, 2024
Forked from HTML Starter

This example shows a simple bar chart of eight numeric values rendered as SVG rectangles, with each value labeled directly above its bar. The chart uses D3.js version 5’s data join pattern (`selectAll`, `data`, `enter`, `append`) to create `rect` elements from a hardcoded array. Bar heights encode the data values, and text labels are added using the same data join. The SVG canvas has fixed dimensions of 500 by 300 pixels, with bars spaced by a constant padding.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.