🌍 Public
Viewing a saved revision (read-only)
d4810f0da81b4e9bae76b0ab1b696cb9
Fork of Fork of Scatter Plot with Shape
This example uses the Iris flower dataset to display a scatter plot of sepal length against petal length, with each of the three species differentiated by a distinct symbol shape. The visualization separates the axes and legend into reusable modules, employing D3’s `scaleOrdinal`, `symbolsFill`, and `symbolGenerator` to render the shapes. A custom legend component maps each species to its corresponding glyph, while the chart updates asynchronously after fetching and parsing the CSV data with `csvParse`. The code relies on D3 v7 APIs including `axisLeft`, `axisBottom`, and `scaleLinear`.
AI-generated description