Viewing a saved revision (read-only)
322e7b6f8f14493bbb0babd72ebbbcc6
D3 Reusable Charts
This example demonstrates a reusable scatter plot component built with D3 v6 that cycles through different iris flower measurements every two seconds. The visualization uses the classic Iris dataset loaded from a GitHub gist, with sepal length plotted on the y-axis while the x-axis rotates through sepal length, petal length, sepal width, and petal width. The scatterPlot function exposes chainable setter methods for configuring dimensions, margins, data accessors, and point radius, while the main script uses D3’s `select`, `csv`, `scaleLinear`, `axisLeft`, and `axisBottom` APIs to render the SVG with animated transitions.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.