Skip to main content
100%

Task8_Question2

✓ Published0🌍 Public
KKeerthi
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

A horizontal stacked bar chart visualizes the proportional distribution of religious populations (in billions) across China, India, and the United States. The chart uses d3.scaleBand and d3.scaleLinear with a d3.axisBottom, encoding each religion with a distinct color from a d3.scaleOrdinal. Hovering a rect triggers a simple opacity change and a custom tooltip via mouseover and mousemove. Data loads from a local CSV using d3, and the visualization renders as SVG, importing D3 v7 from UNPKG.

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