Skip to main content
100%

Fork of Fork of D3 Starter

✓ Published0🌍 Public
Aatmr0
Last edited Nov 21, 2023
Created on Nov 21, 2023
Forked from Fork of D3 Starter

This example demonstrates how to set up a D3 force simulation and a scatter plot using reusable modular functions. It imports `csv`, `select`, `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` from D3, along with the `d3-selection-multi` library for chainable `.attrs()` calls. The visualization appends an SVG to the body sized to the full viewport, runs `d3.forceSimulation` on a single data point, and updates circle positions on each simulation tick. A separate `scatterPlot` module builds axes and marks from data arrays using linear scales and margins.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes