Prac 5
✓ Published0🌍 Public
This example displays a simple horizontal bar chart built with React and rendered as SVG using D3 v6. Each bar’s width is proportional to the person’s age from the local CSV file `nameage.csv`, with bars spaced vertically at 50-pixel intervals. The code loads the data via `d3.csv`, selects the body, appends an 800x800 SVG canvas, and binds the dataset to `rect` elements whose `width` attribute is computed as `d.age * 20`. All bars are filled with cyan, and the chart includes no axes or labels, focusing purely on raw geometric encoding.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed