Skip to main content
100%

Man SDV Activity6_Task2

✓ Published0🌍 Public
Mmanojapopuri@gmail.com
Last edited Apr 10, 2024
Created on Apr 10, 2024
Forked from Hello VizHub

This stacked bar chart displays sales performance across five product categories—Electronics, Clothing, Books, Furniture, and Toys—for four regions (North, South, East, West), with percentages derived from the CSV dataset. The visualization uses D3.js v7 to render an SVG, employing d3.stack() to compute stacked series, d3.scaleOrdinal for category colors, and d3.scaleBand with d3.scaleLinear for axes. Interactive tooltips show exact category percentages on mouseover, while hover effects change bar opacity, and a legend identifies each category.

AI-generated description

Stacked Bar Chart with D3.js

This project demonstrates how to create a stacked bar chart using D3.js. The dataset used is provided in data.csv. The visualization is implemented in index.html using D3.js. Styling for the visualization is done in styles.css.

Usage

  1. Clone or download the repository.
  2. Open index.html in a web browser.

Dataset

The dataset (data.csv) contains sales performance data of different product categories across various regions.

Libraries Used

  • D3.js (Data-Driven Documents)
MIT Licensed

Similar vizzes