Skip to main content
100%

Activity 6_Question2.1

✓ Published0🌍 Public
Ssiddhubhupathi@gmail.com
Last edited Apr 5, 2024
Created on Apr 5, 2024
Forked from Activity 6_Task2

This example displays the population distribution across age groups for each U.S. state using a stacked horizontal bar chart rendered as SVG. The viz loads a CSV dataset and maps five age categories to color-coded segments along the x-axis, with states ordered along the y-axis. It relies on d3.stack, d3.scaleOrdinal, d3.scaleLinear, and d3.scaleBand for data transformation and layout, while axes are generated with d3.axisBottom and d3.axisLeft. Labels are formatted as percentages using d3.format.

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