Skip to main content
100%

ICE-7.1 - Reusable Scatter Plot

✓ Published0🌍 Public
SShashi42
Last edited Mar 26, 2023
Created on Mar 25, 2023

This example presents a reusable scatter plot of the Iris Dataset, cycling through four different x-axis columns every two seconds while keeping sepal_length on the y-axis. Implemented with D3 v6, it uses a custom `scatterPlot` function with getter-setter methods, `scaleLinear` for axes, `scaleOrdinal` for species-based symbols and colors, and SVG paths with animation. The code loads CSV data via `d3.csv`, renders with `d3.axisLeft` and `d3.axisBottom`, and relies on `setInterval` to animate the visual transitions.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

MIT Licensed

Similar vizzes