🌍 Public
Viewing a saved revision (read-only)
735c2ff42bf846e5b2a23a5c6293b428
ICE-7 Reusable scatter plot with different symbol
CChandrashekharRamamuthi
Last edited Mar 27, 2023
Created on Mar 27, 2023
This example presents a reusable D3.js scatter plot that visualizes the Iris dataset, encoding species type through both color and distinct symbols. The chart plots petal width against sepal length, with each data point rendered as an SVG path using `d3.symbol` for the shapes and `d3.scaleOrdinal` for color mapping. The code demonstrates a reusable chart pattern through a `scatterPlot` function that accepts configuration via getter-setter methods, applying `d3.scaleLinear` for axes and `d3.axisBottom` and `d3.axisLeft` for annotations.
AI-generated descriptionA vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.