Skip to main content
100%

Car Type Distribution

✓ Published0🌍 Public
JJayanthKumarkoni
Last edited Jul 23, 2023
Created on Jul 23, 2023
Forked from Hello VizHub

A stacked horizontal bar chart shows the proportional distribution of five car types—compact, midsize, large, SUV, and truck—across three brands, with each bar segmented by percentage. The visualization uses D3 v7’s `d3.stack` to compute stacked series, `d3.scaleBand` for brand categories, and `d3.scaleOrdinal` for color mapping. SVG rects render the segments, and mouseover tooltips display exact percentages. Data comes from a local CSV file, with axes and a legend generated via `d3.axisBottom` and manual legend elements.

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