🌍 Public
Viewing a saved revision (read-only)
831f7071e7fc4e3e8543477233d53773
Activity6_Task1_Question1
This example shows a horizontal bar chart ranking the populations of ten countries for the year 2020, using data loaded from a CSV file hosted on GitHub. The visualization uses React and D3 v5, with `scaleBand` for the categorical y-axis, `scaleLinear` for the quantitative x-axis, and SVG `<rect>` elements drawn via `Marks`. Axes are rendered with custom `AxisBottom` and `AxisLeft` components, while tick labels use D3’s `format` with `.2s` notation to abbreviate values to billions. The chart displays “POPULATION-2020” as its axis label.
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.