Skip to main content
100%

Reusable D3 Scatter Plot with symbols

✓ Published0🌍 Public
KKhanin Sisaengsuwanchai
Last edited May 22, 2023
Created on May 19, 2023

This example demonstrates a reusable scatter plot that visualizes the Iris dataset, mapping sepal length and width while using different D3 symbols (circles, crosses, diamonds, and squares) to distinguish flower species. The visualization renders as an SVG and leverages d3.scaleLinear for axes, d3.scaleOrdinal for symbol types and colors, and d3.symbol to generate the mark paths. The chart is built with a custom scatterPlot function that accepts configurable accessors and margin settings, making it adaptable for other datasets and variables.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes