Skip to main content
100%

activity 6_q3

✓ Published0🌍 Public
Sshettisowmya01@gmail.com
Last edited Oct 20, 2024
Created on Oct 18, 2024
Forked from Hello VizHub

This horizontal stacked bar chart displays sales data for five beauty products, breaking down total sales into two colored segments: Price and Quantity, with product names on the y-axis and the aggregated sales value on the x-axis. Built with D3.v7, the visualization uses `d3.scaleLinear` and `d3.scaleBand` for axes, `d3.stack()` to compose the stacked segments, and `d3.axisBottom`/`d3.axisLeft` for tick marks. The SVG rendering includes color encoding via `d3.scaleOrdinal` for the two stacked categories, with a legend and concise axis labels, drawing from a local dataset where each row specifies product, brand, price, and quantity.

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