Skip to main content
100%

Activity6Question2

✓ Published0🌍 Public
Gganeshseeram5decem@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Activity6Question1

This example displays a horizontal bar chart of population figures for 20 countries in 2020, using CSV data loaded from a GitHub repository. React renders SVG elements, while D3 v5 handles scales and formatting: `scaleBand` maps countries to y-axis positions and `scaleLinear` maps population values to bar widths. The chart includes formatted tick labels that convert values to billions (e.g., "G" replaced with "B") and native SVG `<title>` elements for tooltips. Reusable React components (`AxisBottom`, `AxisLeft`, `Marks`) structure the visualization.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes