Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Scatterplot IV - dynamic, idempotent charts

Public visualization

Viewing a saved revision (read-only)

07386101516c4438a4291d95563ef706

D3 Scatterplot IV - dynamic, idempotent charts

0 stars1🌍 Public
MMarvin Frede
Last edited Oct 2, 2023
Created on Sep 29, 2023

This example presents a dynamic scatter plot that cycles through different attribute pairs from the Iris flower dataset every two seconds. It visualizes measurements like petal length and sepal width as circles, with axes updating to reflect the currently selected dimensions. The chart uses D3’s `scaleLinear` to map data ranges to pixel coordinates, and leverages the `join` API for idempotent rendering, ensuring circles and axes are efficiently updated without duplication. A timer triggers re-renders, making the visualization animate through the dataset’s numeric columns.

AI-generated description

Learning about

  • scaleLinear (and some other scale types)
  • domain
  • range