Skip to main content
100%

Bar chart

✓ Published0🌍 Public
AAlina Sul
Last edited Mar 21, 2020
Created on Mar 21, 2020
Forked from Basic Bar chart

This example renders a simple bar chart using D3 v5 with SVG output within a React framework. Six hardcoded data values are displayed as vertical bars, with bars colored red for values 80 or higher and gray for lower values. Each bar’s height is twice its data value, and the corresponding number labels each bar. The chart uses D3’s `select`, `append`, and `attrs` methods to construct and style the SVG rectangles and text elements, with the page structured by an HTML file loading the D3 libraries and the chart script.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes