DV A6 T2
✓ Published1🌍 Public
This scatter plot visualizes the Iris dataset, showing the relationship between sepal length and petal length for three flower species, with tooltips revealing exact values on hover. Using D3.js v7, the visualization loads CSV data via `d3.csv`, maps the variables to linear scales with `d3.scaleLinear`, and assigns categorical colors with `d3.scaleOrdinal`. The code renders the plot as SVG, drawing axes with `d3.axisBottom` and `d3.axisLeft`, and includes gridlines, axis labels, and a chart title, with hover interactions handled through mouse events and a custom tooltip element.
AI-generated descriptionMIT Licensed