Skip to main content
100%

Bar graph

✓ Published1🌍 Public
Ppanduvik99@gmail.com
Last edited Mar 20, 2024
Created on Feb 27, 2024
Forked from Smiley Face

This example shows a horizontal bar graph that compares the protein content of various food items, with each item’s name on the y-axis and protein grams on the x-axis. The visualization uses React to manage the component state and D3 v6 scales (`scaleBand`, `scaleLinear`) and axes (`axisBottom`, `axisLeft`) to render the SVG chart. Data is loaded asynchronously from a CSV file using D3’s `csv` method, and bars are drawn as SVG rectangles with a fixed color.

AI-generated description

A bare minimum HTML page.

MIT Licensed

Similar vizzes