Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_tak2.1

Public visualization

Viewing a saved revision (read-only)

d5ed786c4c30428e9eee3ebf013d1b04

Activity6_tak2.1

0 stars1🌍 Public
KKritin Kesav
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from Hello VizHub

This stacked bar chart visualizes product sales across three categories, with each bar segment representing a product's sales contribution. The chart uses horizontal bars, with colors differentiating categories and a legend identifying each one. The visualization is rendered as an SVG using D3.js v7, employing the `d3.stack()` function to compose the stacked data structure, `d3.scaleLinear()` and `d3.scaleBand()` to set the scales, and `d3.scaleOrdinal()` for color encoding. Mouseover events log category sales amounts to the console, providing an interactive element.

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.