Skip to main content
Public

Share visualization

Loading preview…

Fork of Scatter Plot with Color Legend

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Scatter Plot with Color Legend

0
RRitik Raj
Last edited Mar 29, 2023
Created on Mar 29, 2023

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 description

A scatter plot of The Iris Dataset with color legend.

Comments

Sign in to join the discussion.

MIT Licensed