ICE-7 Reusable scatter plot with different symbol
✓ Published1🌍 Public
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.
MIT Licensed