Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Tutorial 2 Question 3

Public visualization

Viewing a saved revision (read-only)

6e0fbf2db0354430b59216071ac9a3a4

Tutorial 2 Question 3

0 stars0🌍 Public
Cchandrikachowdary867@gmail.com
Last edited Apr 13, 2024
Created on Apr 13, 2024
Forked from Activity-6

This stacked bar chart displays the proportional distribution of five rating categories across three named categories, with each category's segments summing to 100%. The visualization uses D3 v7's `d3.stack()` and `d3.scaleOrdinal()` to generate colored horizontal bars, with `d3.scaleLinear` and `d3.scaleBand` handling the axes. Interactive tooltips, created via DOM elements, appear on mouseover to show precise percentages formatted with `d3.format`. The data comes from a local CSV file, rendered as SVG, with styling defined in a separate CSS stylesheet.

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.