Skip to main content
100%

Activity-6-Question2-1

✓ Published0🌍 Public
Ssowmyaammula.sdv@gmail.com
Last edited Apr 4, 2024
Created on Apr 4, 2024
Forked from Question2

This example visualizes the distribution of sales across electronics categories using a stacked horizontal bar chart with D3.v7. It shows proportions of sales for five ranges, from "less than 5" to "greater than 8.5," across six product categories. The chart uses `d3.stack()` to create stacked segments, `d3.scaleBand` for categories, and `d3.axisLeft`/`d3.axisBottom` for axes. The code attaches a tooltip via `d3.select` to display exact sales values on mouseover. Data is loaded from a CSV file containing category and sales-range percentages.

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