Skip to main content
100%

Fork of Reusable D3 scatterplot with symbols

✓ Published0🌍 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

MIT Licensed

Similar vizzes