Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 7 Tutorial

Public visualization

Viewing a saved revision (read-only)

019efe2d90fa4ed2920c5b29f868cc15

Activity 7 Tutorial

0 stars0🌍 Public
KKhushi Desai
Last edited Nov 2, 2024
Created on Nov 2, 2024
Forked from Hello VizHub

This example visualizes the Iris dataset as an animated scatterplot, cycling through four flower measurements as x-axis values while keeping sepal length on the y-axis. Points are colored by species (Setosa, Versicolor, Virginica) with matching legend markers. The animation cycles through petal width, sepal width, petal length, and sepal length every few seconds. The code uses D3 v6 modules, including `csv`, `scaleLinear`, `axisLeft`, `axisBottom`, and `extent`, with a reusable scatter plot function and ES6 module imports. The SVG renders with custom labels, a color legend, and axis titles that update per iteration.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.