Skip to main content
100%

activity 6_Task 1

✓ Published0🌍 Public
SSumanthnaidu213
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from activity 6_Task 1

This example displays a horizontal bar chart of 2020 population data for 30 countries, using green bars with a blue axis. Built with React and D3.js v5, the visualization uses `d3.scaleBand` for the categorical y-axis, `d3.scaleLinear` for the population x-axis, and `d3.format` to convert large numbers into abbreviated labels like "B" for billions. The data is fetched from a GitHub CSV using `d3.csv`, and interactive tooltips show the formatted population value on hover. The chart is rendered as an SVG with custom reusable components for axes and marks.

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