Skip to main content
100%

Activity-6-Q1.2

✓ Published0🌍 Public
Kkotasc18@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Activity-6-Q1.1

This example displays a horizontal bar chart showing the population of the first 20 countries from a 2010 CSV dataset, using an SVG rendering approach within a React application. The chart incorporates D3.js v5 scales, including `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis, with axes formatted using D3's `format` function to abbreviate large numbers. Each bar includes a tooltip showing the population value via the SVG `<title>` element, while the data is loaded from a GitHub-hosted CSV file using `d3.csv` and processed asynchronously with React hooks.

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