Activity6_Task2
✓ Published0🌍 Public
This example shows a stacked bar chart of employee projects handled and sales achieved, using data from a CSV file hosted on GitHub. The code loads D3 v6 via UNPKG and reads the remote CSV with `d3.csv`. It uses `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, and `d3.stack` to create the stacked series. A color scale with `d3.scaleOrdinal` assigns distinct colors, while mouseover events log bar data to the console, and an extra blue rectangle is appended to the SVG as a rendering check.
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