π Public
Reusable Fork of D3 Scatter plot with Symbols
This example demonstrates a reusable scatter plot component built with D3.js and React, visualizing the classic Iris dataset by mapping petal length against sepal length. The component uses a fluent API to configure dimensions, margins, and data mappings, enabling flexible reuse across different datasets. Rendering occurs through SVG elements, with D3's `scaleLinear`, `extent`, `axisLeft`, and `axisBottom` functions handling coordinate scaling and axis generation. The code showcases a modular approach, separating chart configuration from data loading, which fetches the CSV file asynchronously via `d3.csv` before rendering circles and axes.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed
Comments
Sign in to join the discussion.