Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Episode 9 - Reusable Charts (GIRIBAW)

Public visualization

Episode 9 - Reusable Charts (GIRIBAW)

0 stars2🌍 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

Comments

Sign in to join the discussion.

MIT Licensed