Skip to main content
100%

Activity6_Task1.1

✓ Published0🌍 Public
DDeekshitha Annreddy
Last edited Oct 22, 2024
Created on Oct 22, 2024

This example shows a horizontal bar chart of population data for 20 countries in 2010, using a linear scale for population values and a band scale for country names. The visualization renders as SVG through React components, with D3 v5 handling data loading via `d3.csv` and scale generation through `scaleLinear` and `scaleBand`. The code defines reusable React components for the bottom and left axes plus marks, and formats population values using D3's `format` function. Data comes from a GitHub-hosted CSV file, with each bar including a native SVG tooltip showing the formatted population value.

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