🌍 Public
Viewing a saved revision (read-only)
392c71f0e884490b98b7d2c1c4532078
Idempotent Rendering Pattern
This example demonstrates the idempotent rendering pattern for D3 visualizations, showing a scatter plot of penguin bill length versus bill depth using a clean, green background. The chart renders circles for each data point and includes labeled axes via a reusable `axes` module. The code applies the join pattern with `selection.selectAll(...).data([null]).join(...)` for both SVG elements and axes, ensuring that updates are deterministic and render correctly on each call. It uses `scaleLinear` and `extent` to compute scales, with margins and dimensions passed through a shared state object.
AI-generated descriptionCreating circles with D3.
Challenge
- Fork this example
- Modify it
- Maybe make it Halloween themed
- Maybe make it Christmas themed
- Be creative
Svelte
Here's a video on how to get started with Svelte as well!