Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Task8_Tutorial 2_Q

Public visualization

Viewing a saved revision (read-only)

6729543b635b4e8d823a2870f0d5c77c

Task8_Tutorial 2_Q

0 stars0🌍 Public
SSushmaNamidi@my.unt.edu
Last edited Apr 15, 2024
Created on Apr 14, 2024
Forked from Hello VizHub

This stacked bar chart visualizes the percentage of revenue across six product categories, with each bar segmented into five revenue ranges from "less than 100" to "above 5000." The data comes from a CSV file, and the visualization uses d3.stack() to compute the stacked segments, with a d3.scaleOrdinal providing color encoding for each revenue range. Hovering over any segment triggers a tooltip that displays the exact percentage for that category and revenue range. The chart employs d3.scaleLinear for the x-axis, d3.scaleBand for the y-axis categories, and SVG rect elements for rendering the bars.

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.