Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ACTIVITY8_task1

Public visualization

ACTIVITY8_task1

0 stars0🌍 Public
Aajaykumarakula00@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024

This example displays a horizontal bar chart of country populations for 2020, with each country labeled on the y-axis and population values on the x-axis. The visualization uses React with D3 v5, employing d3.scaleBand for the categorical axis, d3.scaleLinear for the quantitative axis, and d3.format to abbreviate large numbers (e.g., converting billions to "B"). Data loads asynchronously via a custom useData hook, while custom AxisBottom, AxisLeft, and Marks components render the SVG elements. Styling includes green bars, blue tick lines, and a Poppins font family.

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