Dot Plot: Goals: MessiVRonaldo
✓ Published0🌍 Public
This dot plot compares Lionel Messi and Cristiano Ronaldo’s goal totals by season, with each year on the y-axis and a grey line connecting the two players’ goal counts. The visualization overlays the plot on a football pitch diagram, using SVG rectangles and lines for field markings. Built with D3 v4, it uses `d3.scaleLinear` and `d3.scaleBand` for axes, while circles are colored green for Messi and purple for Ronaldo. Clicking the player labels toggles the corresponding data points’ opacity via `d3.selectAll` and `.transition()`. Data is loaded from a CSV via `d3.csv`.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed