Skip to main content
100%

Reusable Scatter Plot

✓ Published0🌍 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.
MIT Licensed

Similar vizzes