Skip to main content
100%

Basic Bar Chart

✓ Published1🌍 Public
ZZac02
Last edited Mar 3, 2023
Created on Mar 3, 2023
Forked from HTML Starter

This example shows a basic bar chart comparing fruit categories (Apples, Oranges, Bananas, Pears) with corresponding numerical values. The chart renders as an SVG using React and D3 v5, employing `d3.scaleBand` for the x-axis positioning and `d3.scaleLinear` for the y-axis scaling. Bars appear in steelblue, with axes generated through `d3.axisBottom` and `d3.axisLeft`. The underlying data is hardcoded in the React component, and the visualization updates whenever the data prop changes.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes