Skip to main content
100%

Question2

✓ Published1🌍 Public
Gganesh.hns48@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Hello VizHub

A stacked bar chart displays quarterly sales by product category, with categories on the y-axis and sales totals on the x-axis. The visualization uses D3 v7's `d3.stack`, `scaleBand`, `scaleLinear`, and `scaleOrdinal` APIs to construct the chart, with tooltips revealing the category and sales amount per segment. Data from the CSV file is loaded and rendered as SVG rectangles, with an interactive legend and axis labels. The code leverages D3's declarative `.join` pattern for efficient element updates.

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