Skip to main content
100%

Learn Reusable Scatter plot

✓ Published1🌍 Public
Ccoderhh
Last edited Jan 20, 2024
Created on Jan 20, 2024
Forked from Learn Scatter plot

This example demonstrates a reusable scatter plot component built with React and D3.js, visualizing the classic Iris dataset. The plot maps petal length to the x-axis and sepal length to the y-axis, with each flower represented as a circle. The reusable component, created via a custom `scatterPlot` function, encapsulates axis rendering and point positioning, configured through a fluent API for dimensions, margins, and data accessors. The SVG output uses D3’s scale functions and axis helpers, with styling applied via CSS.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes