Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Que1_2

Public visualization

Viewing a saved revision (read-only)

459ce44f8f9e4d049174a016de82349c

Activity6_Que1_2

0 stars0🌍 Public
Ggroup118sai@gmail.com
Last edited Oct 18, 2024
Created on Oct 18, 2024
Forked from Activity6_Que1_1

This example presents a horizontal bar chart comparing the 2010 populations of twenty countries, rendered as SVG within a React application. The data is loaded from a CSV file using `d3.csv`, with bars drawn as `rect` elements whose widths are scaled by `d3.scaleLinear`. Axes are generated with `d3.scaleBand` and custom components, while tick labels use `d3.format` to abbreviate large numbers. Hovering over a bar reveals the precise population value via a native SVG `<title>` tooltip.

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.