Skip to main content
100%

Activity 6 Question 1.2

✓ Published0🌍 Public
Kkesava
Last edited Oct 25, 2024
Created on Oct 23, 2024
Forked from Hello VizHub

This example displays a horizontal bar chart of 2010 population data for 20 countries, with bars sorted by country name along the y-axis and population values on the x-axis. Using React with D3 v5, it loads CSV data via `d3.csv`, scales the population with `scaleLinear`, and positions bars with `scaleBand`. Tooltips appear on hover via SVG `<title>` elements, while custom `AxisBottom` and `AxisLeft` components render ticks, and axis labels are formatted with `d3.format`.

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