Skip to main content
100%

Reusable D3 Scatter plot dec14

✓ Published1🌍 Public
WWasanta Pruttisarikorn
Last edited Dec 22, 2022
Created on Dec 19, 2022

This example renders a scatter plot of the Iris dataset, plotting petal length against sepal length using a reusable D3 chart component. The code loads data via `d3.csv`, maps values with `scaleLinear`, and renders circles as SVG elements. Axes are added using `axisLeft` and `axisBottom`, while the component’s width, height, margins, and radius are configured through a fluent API. The visualization fills the browser window and updates dynamically based on the provided data.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes