Skip to main content
100%

Activity-8 Q1.2

✓ Published0🌍 Public
SSree Yuktha Sunkara
Last edited Apr 13, 2024
Created on Apr 13, 2024
Forked from Activity-6

This example presents a horizontal bar chart showing the populations of 20 countries for the year 2010, using data from a remote CSV file. The visualization uses D3 v5 within a React framework, rendering a scalable vector graphic (SVG) with green bars. It employs D3’s `scaleBand` for the categorical country axis and `scaleLinear` for the population scale, while the `AxisBottom` and `AxisLeft` modules generate tick marks. The code also demonstrates custom formatting, converting values to billions with the `format` function, and uses React's `useData` hook to load and process the data.

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