Skip to main content
100%

Activity6_Task2

✓ Published0🌍 Public
Rrajeswariamruthabommaraju@my.unt.edu
Last edited Oct 24, 2024
Created on Oct 24, 2024
Forked from Hello VizHub

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 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.
MIT Licensed

Similar vizzes