Skip to main content
100%

Task 2 Questions

✓ Published0🌍 Public
SSiddhardha
Last edited Oct 23, 2024
Created on Oct 23, 2024
Forked from Hello VizHub

A stacked bar chart displays survey responses for social media usage across six age groups, with each bar segmented by platform (Facebook, Instagram, Twitter, Snapchat, LinkedIn). The visualization uses D3.js version 7 to load CSV data via `d3.csv`, prepares the data with `data.columns` and `d3.sum`, and employs `d3.stack` to compute stacked series. Bars are rendered as SVG `<rect>` elements with colors from `d3.scaleOrdinal` and `d3.schemeCategory10`. Interactive tooltips appear on mouseover, showing the percentage for the hovered platform, while axes are generated with `d3.axisBottom` and `d3.axisLeft`.

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