Skip to main content
100%

Reusable D3 Scatterplot with Symbols

✓ Published0🌍 Public
Aadityapalliyil0@gmail.com
Last edited Oct 2, 2024
Created on Oct 2, 2024

A reusable D3 scatterplot displays the Iris dataset with species encoded by symbol type, plotting petal length against sepal length. The chart uses `scaleLinear` for axes, `scaleOrdinal` with `symbols` for species-specific shapes, and `symbolGenerator` to construct SVG paths. The `scatterPlot` function exposes chainable setters for width, height, data, margins, and accessors, applied via `svg.call()`. Axes are rendered with `axisLeft` and `axisBottom`, while `d3.csv` loads the data and parses numeric fields.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes