Activity_6_task2_question-1
✓ Published0🌍 Public
This example displays a stacked bar chart of employee churn, breaking down counts of "Yes" and "No" exits per department (Sales, IT, HR, Finance, Marketing). The horizontal bars use a diverging pink and blue color scale. Built with D3 v7, the code loads CSV data, applies `d3.rollup` to aggregate counts by department, and uses the `d3.stack` function to create the stacked layers. It renders as an SVG with a custom legend and axis labels.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed