Fork of Best Cricket Captains
✓ Published0🌍 Public
This example displays a bar chart comparing the number of matches won against matches captained for leading cricket captains, with each bar sorted by total matches captained and colored distinctly. The visualization uses D3.js v7 to load data from a CSV file via `d3.csv`, then creates an SVG chart with linear scales (`d3.scaleLinear`) for both axes and an ordinal color scale for bar fills. Interactive tooltips appear on mouseover events, showing captain name, match counts, and calculated win percentage, while the bars change color to orange on hover and revert when the mouse leaves. The chart is rendered with a pink background and rounded container styling.
AI-generated descriptionMIT Licensed