🌍 Public
Viewing a saved revision (read-only)
096694f7ba064dce826426c01c26156c
Activity6-Question1.2
This example presents a horizontal bar chart comparing the populations of twenty countries using data from a CSV file, with bars colored green and labeled axes. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis. The `Marks` component renders SVG rectangles for each bar, while `AxisBottom` and `AxisLeft` generate the ticks and labels. Population values are formatted using `d3.format` with a custom tick format that converts 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.