Skip to main content
100%

Fork of D3 Starter

✓ Published1🌍 Public
Aatmr0
Last edited Nov 17, 2023
Created on Nov 16, 2023
Forked from D3 Starter

This visualization demonstrates a scatter plot of the Iris dataset, mapping petal length against sepal length with circular marks. The code uses D3 version 7 with the `d3-selection-multi` extension to simplify attribute setting. It employs `scaleLinear` for axes, `extent` for domain calculation, and `axisLeft`/`axisBottom` for rendering ticks. The reusable `scatterPlot` function exposes setter methods for width, height, data, margins, and accessor functions, following a module pattern. The data is loaded asynchronously from a CSV file via `d3.csv`, with numeric parsing applied to each row before rendering as SVG circles.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes