Skip to main content
100%

ICE 7 - Reusable D3 ScatterPlot.

✓ Published0🌍 Public
NNaveen Kumar
Last edited Mar 30, 2023
Created on Mar 29, 2023
Forked from HTML Starter

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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes