Skip to main content
100%

Minimal Reusable Charts Pattern + React

✓ Published0🌍 Public
DDasbach.EJ
Last edited May 5, 2021
Created on May 5, 2021

This example demonstrates the Minimal Reusable Charts pattern, rendering an interactive scatter plot of the Iris Dataset with D3.js and React. The chart displays sepal length and width measurements as circles, using `d3.scaleLinear` for coordinate mapping and `d3.extent` for domain calculation. The reusable chart function `scatterPlot()` exposes setter methods for data, dimensions, and accessor functions, which are invoked via `g.call(plot)`. Data loads asynchronously from a CSV URL using `d3.csv`, and the SVG output fills the browser viewport.

AI-generated description

A minimal scatter plot of the Iris Dataset using an adaptation of Towards Reusable Charts.

ISC Licensed

Similar vizzes