🌍 Public
Viewing a saved revision (read-only)
3612381cd7244b27a2e3f0ddb10704c2
Fork of a complete barchart
This example shows a simple bar chart visualizing an array of nine numeric values as blue rectangles with value labels above each bar. The chart includes axes on the left and bottom. It uses D3 v5 with SVG rendering in a React-friendly HTML setup, employing `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, and `d3.axisBottom` and `d3.axisLeft` to generate the ticks. Bars are appended via data joins, with custom margins and padding.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.