Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity-6-Question-2

Public visualization

Viewing a saved revision (read-only)

5d74e6ef66fd4d748da6718b18f12644

Activity-6-Question-2

0 stars0🌍 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.