Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Task1

Public visualization

Viewing a saved revision (read-only)

905ba16fbd8842298019f3f5865b11f1

Activity6_Task1

0 stars2🌍 Public
KKhushi Desai
Last edited Oct 22, 2024
Created on Oct 19, 2024
Forked from Hello VizHub

This example displays a horizontal bar chart comparing 2020 population figures for 30 countries. The visualization uses React to render SVG elements, with d3.scaleBand for the categorical y-axis and d3.scaleLinear for the numerical x-axis. Data is loaded asynchronously from a CSV file via d3.csv, and population values are formatted using d3.format with a custom tick formatter that converts gigabytes to billions. The chart includes axes generated through custom React components and interactive tooltips using SVG title elements.

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.