Skip to main content
100%

Fork of Reusable D3 Scatter Plot

✓ Published0🌍 Public
Ssdarsi2404@gmail.com
Last edited Apr 1, 2025
Created on Apr 1, 2025

This React-based visualization displays two D3 scatter plots comparing cricket player statistics—Runs versus Strike Rate and Wickets versus Balls Faced—with color-coded points by match type (T20, ODI, Test) and tooltips showing player names. It loads CSV data via `d3-fetch`’s `csv` function, transforms numeric fields with JavaScript’s unary plus operator, and renders SVG circles using `d3-scale`’s `scaleLinear` and `scaleOrdinal` for axes and color encoding. Axes are generated with `d3-axis`’s `axisBottom` and `axisLeft`, with the reusable `plotScatter` function invoked twice in a `useEffect` hook.

AI-generated description
MIT Licensed

Similar vizzes