ICE 7 - Reusable D3 ScatterPlot.
✓ Published0🌍 Public
This example presents an animated scatterplot of the Iris dataset, cycling through different petal and sepal measurements on the x-axis while the y-axis remains fixed on sepal length. The visualization uses D3 v6 within a React framework, rendering SVG circles whose colors correspond to iris species. A reusable `scatterPlot` function, built with `scaleLinear`, `axisLeft`, and `axisBottom`, handles the axes and marks, while `setInterval` triggers periodic updates to the x-axis mapping. The code also includes custom legend labels and axis titles generated dynamically.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed