Activity6-Question1-1
✓ Published0🌍 Public
This example shows a horizontal bar chart comparing the populations of ten countries in the year 2000, using data loaded from a CSV file. The visualization renders as an SVG within a React app, using D3 v5 APIs like `scaleBand` and `scaleLinear` to position bars and axes. Custom React components—`AxisBottom`, `AxisLeft`, and `Marks`—build the chart, with axis tick lines styled blue and bars filled light green. A native SVG `<title>` element provides tooltips on each bar, and population labels are formatted with `format('.2s')` to display abbreviations like "B" for billions.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed