Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task8_Question1_b

Public visualization

Viewing a saved revision (read-only)

2c0eac1b88fa4b4b9908b829c579d14a

Task8_Question1_b

0 stars0🌍 Public
Ppranayrajana.97@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This example shows a bar chart of the population of 20 countries in 2010, using a horizontal layout where each bar’s length encodes the population value and country names label the y-axis. The visualization is rendered as SVG using React, with scales from d3.scaleBand and d3.scaleLinear mapping data to positions and sizes. The code retrieves CSV data via d3.csv, formats tick labels with d3.format, and builds axes from React components that generate SVG elements. The bars include a native SVG title tooltip, displaying the formatted population value on hover.

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.