Skip to main content
100%

Population Bar Chart

✓ Published0🌍 Public
VVenkat-Sumith-Thota
Last edited Jul 22, 2023
Created on Jul 20, 2023
Forked from Hello VizHub

This bar chart visualizes population figures for five countries—USA, Canada, India, France, and UK—using a static SVG rendered with d3.v6. It employs `d3.scaleLinear` for the y-axis population scale and `d3.scaleBand` for the categorical x-axis. Bars change color from blue to red on mouseover via `transition`. Population labels appear atop each bar using `toLocaleString`, and axes are drawn with `d3.axisBottom` and `d3.axisLeft`. The dataset is hardcoded in the script; no external data source is loaded.

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