🌍 Public
Viewing a saved revision (read-only)
a25c47e27b7e4fc6b8177234d399c5c9
Reusable_Scatter Plot
This example shows how sales in 2019 relate to sales in 2021 for different car types, with each circle’s position encoding the two years’ values. The chart animates every two seconds, cycling the x-axis through 2019, 2020, and 2021 sales while keeping the y-axis fixed on 2019. The reusable scatter plot is built with D3 v6, using `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` to render axes, and SVG circles with a radius of 5 pixels. Data is loaded from a CSV via `d3.csv`, and the plot’s dimensions adapt to the window size.
AI-generated descriptionA reusable scatter plot inspired by Towards Reusable Charts.
Shows the Iris Dataset.