Car Type Distribution
✓ Published0🌍 Public
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 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