Skip to main content
100%

Population

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

This example displays a static bar chart of population figures for five countries, rendered as an SVG. It loads the D3 v6 library via UNPKG and uses `d3.scaleLinear`, `d3.scaleBand`, `d3.axisBottom`, and `d3.axisLeft` to construct the visualization. Bars change color from blue to red on mouseover via D3 transitions. Population values are displayed as text labels above each bar. The chart defines its own dimensions, margins, and axes, using the hardcoded `popn` dataset.

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