reusable D3 scatterplot
✓ Published2🌍 Public
This reusable D3 scatterplot displays the classic Iris dataset, plotting petal width against sepal length with points colored by species via a categorical color scale. The visualization is built as a custom D3 function that returns a chart component, configured through fluent setter methods for dimensions, margins, data accessors, and radius. Using SVG rendering, the code applies `scaleLinear` for both axes, `scaleOrdinal` with `schemeCategory10` for categories, and `axisLeft`/`axisBottom` for ticks. The scatterplot is rendered inside a React-compatible structure despite using plain D3 selections.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed