Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Reusable D3 scatterplot with symbols

Public visualization

Viewing a saved revision (read-only)

990ffffe0abc4a38a766e1136b40e528

Fork of Reusable D3 scatterplot with symbols

0 stars0🌍 Public
BBart van Pelt
Last edited Jan 17, 2023
Created on Jan 17, 2023

This example presents a reusable D3.js scatterplot that visualizes the classic Iris flower dataset, encoding species with distinct SVG symbols (circles, crosses, and diamonds) via a d3.scaleOrdinal mapping to d3.symbols. The chart maps petal width to the x-axis and sepal length to the y-axis using d3.scaleLinear, with axes generated by d3.axisBottom and d3.axisLeft. The code demonstrates a modular chart factory pattern, where configuration methods like .width(), .data(), and .symbolValue() are chained to customize the plot, following the margin convention and rendering data-loaded CSV values as SVG path elements.

AI-generated description

Example Reusable scatterplot

https://www.youtube.com/watch?v=xkBheRZTkaw To 12:31

References