Skip to main content
100%

Activity6_Q2

✓ Published0🌍 Public
TTarshit Vupperla
Last edited Oct 23, 2024
Created on Oct 23, 2024
Forked from Activity6_Task2

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 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