Fork of Scatter Plot with Color Legend
✓ Published0🌍 Public
This example visualizes the Iris dataset as a scatter plot, encoding petal length on the x-axis, sepal width on the y-axis, and species as color through a categorical legend. It uses D3 scales (scaleLinear, scaleOrdinal) to map data to positions and colors, while React components—AxisBottom, AxisLeft, ColorLegend, and Marks—render the SVG axes, circles, and legend. The data loads asynchronously via d3.csv, and the chart includes native SVG tooltips via the title element.
AI-generated descriptionA scatter plot of The Iris Dataset with color legend.
MIT Licensed