Scatterplot with color legend
✓ Published1🌍 Public
This example displays the classic Iris dataset as a scatterplot, mapping sepal length on the x-axis and petal length on the y-axis. Each point is colored by the species of the flower, with a custom color legend on the right side identifying the three categories. The visualization is built using the D3 v7 API, including `d3.select`, `d3.scaleLinear`, and `d3.scaleOrdinal` for data mapping. A custom legend component and axis components are assembled using D3’s join operation, organizing the visual elements into distinct groups.
AI-generated descriptionMIT Licensed