Skip to main content
100%

Activity6_Q2

✓ Published0🌍 Public
Ssaiteja.cse.rymec@gmail.com
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Hello VizHub

A stacked bar chart compares car makes by three metrics: horsepower, torque, and highway MPG. Each horizontal bar is segmented by metric, with a color scale distinguishing them and a legend implied by the colors. The visualization loads CSV data via `d3.csv` and uses `d3.stack`, `d3.scaleOrdinal`, `d3.scaleLinear`, and `d3.scaleBand` to construct the SVG rendering. Interactive tooltips display the metric value on hover, using mouse events and a styled div.

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