Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Reusable Scatter Plot

Public visualization

Viewing a saved revision (read-only)

1537384745174b62a9329fca63bf2502

Reusable Scatter Plot

0 stars0🌍 Public
UUVarshaReddy
Last edited Jul 21, 2023
Created on Jul 21, 2023
Forked from Hello VizHub

This example demonstrates a reusable scatter plot built with D3 v6, displaying Iris flower measurements with petal length on the x-axis and sepal length on the y-axis. The visualization loads CSV data from a GitHub repository and uses a custom `scatterPlot()` function that encapsulates scales, axes, and labels through a configurable API with methods like `.width()`, `.data()`, and `.xValue()`. The SVG rendering includes axis labels and animated circle elements, showing how D3's modular functions enable flexible, reusable chart components.

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.