Activity-6-Question-2
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed