Skip to main content
100%

Activity-6-Question-2

✓ Published0🌍 Public
Pphanisrivinnakota@gmail.com
Last edited Apr 6, 2024
Created on Apr 6, 2024
Forked from Hello VizHub

This example uses a diverging stacked bar chart to display the breakdown of vehicle types by torque and horsepower. The chart renders as horizontal bars for each vehicle make, with segments colored by rating category. The visualization uses D3 v7 APIs including `d3.stack`, `d3.scaleOrdinal`, and `d3.scaleBand` to construct the layout. Hover interactions reveal precise percentage values via a tooltip. Data comes from a CSV file containing make, horsepower, torque, and highway MPG values, which are transformed into stacked proportions for each bar.

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