🌍 Public
Viewing a saved revision (read-only)
378c8db3e8694e3abb3269a95d9e2df3
Simple bar chart
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.