🌍 Public
Viewing a saved revision (read-only)
78c71dfff98942faaee26d7d820e54d8
Fork of onclick change color
This example uses D3 v6 with React to render the classic Iris dataset as an SVG scatterplot. The visualization maps sepal length to the x-axis and sepal width to the y-axis using d3.scaleLinear and d3.extent for domain calculation. Each circle has a radius of 30 pixels and is positioned through xScale and yScale functions. The code sets an onmouseover attribute on circles to change their fill color to red, though the styling is implemented via inline attribute rather than D3 event handlers. The SVG canvas fills the entire browser window with margins applied.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.