Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Ques1(1)

Public visualization

Activity6_Ques1(1)

0 stars0🌍 Public
Nnithinnc@outlook.com
Last edited Apr 11, 2024
Created on Apr 11, 2024

This visualization displays population data from the year 2000 for ten countries as a horizontal bar chart using React and D3 v5. The bars are rendered as SVG rectangles, with the x-axis showing population values formatted in billions and the y-axis listing country names. The code uses D3's `scaleBand` and `scaleLinear` for axis scaling, `csv` for data loading from a GitHub repository, and React hooks to fetch and process the data. Hovering over each bar reveals its exact population value through a tooltip.

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.

Comments

Sign in to join the discussion.

MIT Licensed