Skip to main content
100%

Reusable (ProD3js pattern) D3 Scatter Plot

✓ Published0🌍 Public
JJimMaltby
Last edited Apr 18, 2022
Created on Apr 15, 2022
Forked from D3 Scatter Plot

This reusable D3 scatter plot displays the Iris dataset, plotting petal length against sepal length as circles in an SVG chart. Built with the Pro D3.js reusable chart module pattern, the code uses d3.csv to load data, d3.scaleLinear for axis scales, and d3.axisBottom and d3.axisLeft for the axes. The chart applies a standard margin convention and container groups for organization. The implementation demonstrates how to encapsulate chart components—scales, axes, and SVG construction—into a modular function, allowing the same scatter plot to be easily applied to different data selections.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.

Applying D3 Resuable pattern from Pro D3.js

MIT Licensed

Similar vizzes