Skip to main content
100%

activity 6 Task 2

✓ Published0🌍 Public
Aa9.hemraj@gmail.com
Last edited Oct 30, 2025
Created on Oct 30, 2025
Forked from Question 2

This example shows the distribution of employee salaries across six departments, broken into five income brackets from "below 50k" to "above 85k." A stacked bar chart displays each department’s proportional share per bracket, with a tooltip revealing the exact percentage on hover. The code uses d3.stack() to aggregate the data from a CSV file and d3.scaleBand and d3.scaleLinear for axes, with d3.axisLeft and d3.axisBottom for ticks. Custom colors, a legend, and interactive opacity changes on mouse events enhance readability.

AI-generated description
MIT Licensed

Similar vizzes