Activity6_Q2
✓ Published0🌍 Public
A stacked bar chart displays quarterly sales figures for five car brands—Tesla, Toyota, Ford, BMW, and Mercedes—from Q1 2022 through Q2 2024. The chart is rendered as SVG using D3 v7, with each brand represented by a distinct color from the Tableau10 palette. The code loads data from a CSV file via `d3.csv`, stacks the series using `d3.stack`, and uses `d3.scaleBand` and `d3.scaleLinear` to position bars. Individual segment values are labeled above each bar, with axes and a legend generated by D3’s axis and legend utilities.
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