Skip to main content
100%

Activity 6_Question 1.2

✓ Published0🌍 Public
Ppenujulilikhil01020@gmail.com
Last edited Oct 25, 2024
Created on Oct 25, 2024
Forked from Hello VizHub

This example displays a horizontal bar chart of population data for 20 countries in 2010, using React with SVG rendering. The visualization imports D3 v5 modules for data loading and scales: `scaleBand` positions country categories along the y-axis, while `scaleLinear` maps population values to bar widths on the x-axis. CSV data is fetched from a GitHub-hosted dataset and formatted using D3’s `format` function. Axes are custom React components, and each bar includes a native SVG `<title>` element for tooltip support. The styling uses CSS classes for marks and ticks.

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