Skip to main content
100%

Fork of Fork of activity 6_Question 1B

✓ Published0🌍 Public
Vvullihanumantharao@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024

This example displays a horizontal bar chart of population data for 20 countries in 2010, using SVG rendering within a React framework. The chart reads a CSV file from a GitHub URL, which is fetched and parsed using D3's `csv` function, then processed with a custom `useData` hook. It builds scales with D3's `scaleBand` and `scaleLinear` functions to position bars and axes, and formats x-axis tick labels using D3's `format` function. User interaction is limited to tooltips showing each bar's value via an SVG `<title>` element.

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