Skip to main content
100%

Reusable D3 Scatter Plot with Symbols

✓ Published0🌍 Public
Ppawelsapiecha
Last edited Dec 10, 2022
Created on Dec 10, 2022

A reusable D3 scatter plot displays the Iris dataset, encoding petal width against sepal length and distinguishing species by symbol type. The code builds a custom chart function using d3.scaleLinear, d3.axisLeft, d3.axisBottom, d3.scaleOrdinal, and d3.symbol to generate SVG paths. Data loads via d3.csv, with numeric parsing handled by a row function. The chart adapts to the window size and applies a fixed margin, rendering symbols sized 50 pixels within an SVG container.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes