Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6-Question1.2

Public visualization

Viewing a saved revision (read-only)

1d87b48478f14b478d38722cbdc0d28f

Activity6-Question1.2

0 stars0🌍 Public
Ssushanthkodipyaka@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024

This example displays the population of 20 countries for 2020 as a horizontal bar chart, with country names on the y-axis and population values formatted in billions on the x-axis. Using React and D3 v5, it loads CSV data via the `csv` function from a GitHub URL, then employs `scaleBand` and `scaleLinear` for the axes. The SVG rendering includes custom `AxisBottom` and `AxisLeft` components, with bars colored light green and tooltips showing formatted values.

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.