Skip to main content
100%

Task8_Q2)

✓ Published0🌍 Public
Mmulyasuji999@gmail.com
Last edited Oct 19, 2024
Created on Apr 13, 2024
Forked from Hello VizHub

This example shows a stacked bar chart of cricket scores by country, with individual bars colored by player name and an interactive tooltip revealing each player's score on hover. Built with D3.js v7, it renders an SVG visualization using `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, and `d3.scaleOrdinal` with `d3.schemeCategory10` for colors. Data is loaded asynchronously from a CSV file via `d3.csv`, and a custom tooltip is implemented using D3's selection and transition methods. A legend is generated dynamically using `color.domain()` and appended as HTML to the page body.

AI-generated description
MIT Licensed

Similar vizzes