Skip to main content
100%

Reusable D3 Scatter Plot Practice

✓ Published0🌍 Public
SSubhendu Karmakar
Last edited Dec 11, 2023
Created on Dec 11, 2023

This example shows a reusable D3 scatter plot that cycles through different Iris flower measurements, animating the x-axis variable every two seconds. The visualization uses D3 scales (scaleLinear) and SVG circles to plot petal length against sepal length, with transitions smoothly moving points between positions. The code demonstrates a reusable chart pattern, where the scatterPlot function exposes setters for width, height, data, and accessor functions, and is called with d3.select and svg.call. Data comes from a CSV file of the classic Iris dataset, parsed with d3.csv.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes