Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity 6 tutorial 3.1

Public visualization

Viewing a saved revision (read-only)

dced4e6de84b4034bca9b43126f5cf1f

Activity 6 tutorial 3.1

0 stars0🌍 Public
AAamani Chamarthi
Last edited Oct 23, 2024
Created on Oct 23, 2024
Forked from Hello VizHub

This example visualizes the Iris dataset with a scatter plot of petal length against petal width, where each circle’s color encodes the three species (setosa, versicolor, virginica) via a switch statement. The code loads CSV data with d3.csv, maps it into x/y positions using scaleLinear and extent, and renders SVG circles with attributes for fill and radius. Axis labels and tick marks are generated with d3.axisLeft and d3.axisBottom, while an inner text element adds rotated labels for both axes.

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.