Skip to main content
100%

activity 6_Task 1

✓ Published0🌍 Public
Ssatvikreddy79@gmail.com
Last edited Apr 5, 2024
Created on Apr 5, 2024
Forked from HelloVizhub

This example shows a horizontal bar chart of population data for 20 countries in 2020, encoded with SVG rectangles whose lengths reflect population values. The chart uses d3.scaleBand for the categorical country axis and d3.scaleLinear for the population scale, with d3.format for axis tick labels. Data loads from a remote CSV via d3.csv in a custom useData hook, while React manages component state. The code demonstrates modular ES6 imports, including local axis and mark components, and includes an SVG title tooltip for each bar.

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