Skip to main content
100%

Activity6_Question2

✓ Published0🌍 Public
JJayanth Reddy Sripathi
Last edited Oct 22, 2024
Created on Oct 22, 2024
Forked from Activity6_Task2

This example shows a horizontal stacked bar chart comparing car specifications—highway MPG, horsepower, and torque—across 31 manufacturers. The data is loaded from a local CSV file and rendered as SVG using D3 v7. The chart uses `d3.stack()` to aggregate the three numeric measures, `d3.scaleLinear()` for the x-axis, and `d3.scaleBand()` for manufacturer categories. Interactive tooltips display exact segment values on hover, and a color-coded legend distinguishes each specification.

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