Skip to main content
100%

Scatter Plot - Reusable

✓ Published1🌍 Public
Mmaxthamt
Last edited Jun 18, 2021
Created on Jun 16, 2021

This example presents a reusable scatter plot built with D3 and React, visualizing the classic Iris dataset. It maps petal length to the x-axis and sepal length to the y-axis, using D3’s `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` APIs to generate axes and position circles. The plot is rendered as SVG within a full-screen viewport, with margins and point radius configured through a chainable function interface. Data is loaded asynchronously via D3’s `csv` parser, demonstrating a modular pattern for encapsulating chart logic.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes