Reusable Scatter Plot
✓ Published0🌍 Public
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 descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed