Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

fork of activity_6_question_2

Public visualization

Viewing a saved revision (read-only)

c46765be48ea40189e3a65f3463b6839

fork of activity_6_question_2

0 stars0🌍 Public
JJaswanthkota@my.unt.edu
Last edited Oct 24, 2024
Created on Oct 24, 2024

This stacked bar chart displays product sales (productA, productB, productC) across four regions (North, South, East, West) using D3 v7. The visualization loads CSV data via `d3.csv` with `d3.autoType`, applies a band scale for regions and a linear scale for sales values, and renders SVG rectangles through the `d3.stack` layout. Color encoding uses `scaleOrdinal` with four categorical colors, with axes generated by `axisBottom` and `axisLeft`. A legend shows product categories, and the chart is scoped within defined margins on a 960×500 SVG canvas.

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.