Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bar Chart without index.js

Public visualization

Viewing a saved revision (read-only)

cbb5be900a4d463094ef9d84ff798674

Bar Chart without index.js

0 stars4🌍 Public
Nnikomc
Last edited Mar 31, 2020
Created on Mar 30, 2020
Forked from HTML Starter

This example shows a simple bar chart of five values rendered as SVG rectangles, with each bar labeled by its numeric data value. The chart is built using D3 v5’s data join pattern (`selectAll`, `data`, `enter`, `append`) to create `rect` and `text` elements. Bars are sized proportionally to the dataset, with fixed chart width and height variables, and include padding between bars. The SVG is appended directly to the body, styled with inline attributes for color, font, and text alignment. The dataset is hardcoded, and no external data source is used.

AI-generated description

A bare minimum HTML page.

See also React Starter.