Skip to main content
100%

Episode 9 - Reusable Charts (GIRIBAW)

✓ Published2🌍 Public
Eemberix@gmail.com
Last edited Dec 3, 2024
Created on Jun 3, 2021

This example demonstrates a reusable scatter plot that visualizes the Iris dataset, mapping petal length on the x-axis and sepal length on the y-axis. The chart is built using D3 v6 and rendered as SVG, with circles sized by a configurable radius and axes drawn using `axisLeft` and `axisBottom`. The code defines a `scatterPlot` function with a fluent API for setting width, height, data, margins, and value accessors, then invokes it via `svg.call()`. Data is loaded asynchronously from a remote CSV using `d3.csv`.

AI-generated description
MIT Licensed

Similar vizzes