Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

question2

Public visualization

Viewing a saved revision (read-only)

6843937727534c4ea7e34de2963d4d3e

question2

0 stars0🌍 Public
Ggketan456@gmail.com
Last edited Oct 22, 2024
Created on Oct 20, 2024
Forked from Hello VizHub

A stacked bar chart shows vehicle sales across five brands, with each bar divided into three color-coded car categories: SUV, sedan, and mini. The chart uses D3 v7's `d3.stack()` and `d3.scaleBand()` to position horizontal bars, with `d3.scaleLinear()` mapping the sales totals. Hovering over a segment triggers a tooltip displaying the exact sales value for that brand and category, using D3 event handlers for mouseover, mousemove, and mouseout interactions.

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.