🌍 Public
Viewing a saved revision (read-only)
1aed3547ac874b7ab48480b54f313d3c
Reusable D3 Scatter Plot
This animated scatter plot visualizes diamond characteristics, mapping carat weight against price while coloring points by color grade via a reusable D3.js chart function. The visualization uses SVG rendering and a d3.scaleOrdinal color scale with d3.schemeCategory10. Buttons trigger play and pause controls, with points entering and updating through smooth transitions on the d3.axisBottom and d3.axisLeft. The code demonstrates a configurable scatterPlot builder pattern that computes scale domains using d3.extent and animates axis and point changes over one-second durations.
AI-generated description