Skip to main content
100%

Activity6_Question1-2

✓ Published0🌍 Public
Aayeshamanzoor111798@gmail.com
Last edited Oct 25, 2024
Created on Oct 23, 2024

This example shows the top 20 countries by 2010 population as a horizontal bar chart, with country names on the y-axis and population totals formatted in billions along the x-axis. Built with React and D3 v5, it uses `scaleBand` for the categorical y-axis, `scaleLinear` for the numeric x-axis, and SVG `<rect>` elements to render each bar. The data is loaded from a CSV file via `d3.csv`, and the chart includes custom axis components and a tooltip showing the formatted population value on hover.

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