Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Custom of Reusable D3 Scatter Plot

Public visualization

Custom of Reusable D3 Scatter Plot

0 stars0🌍 Public
TTehran Mammadov
Last edited Jun 19, 2022
Created on Jun 19, 2022

This example demonstrates a reusable scatter plot built with D3 v7, visualizing the classic Iris dataset. It maps petal length and sepal length to x and y positions using `d3.scaleLinear` and `d3.extent` for domains, with circles rendered in SVG. The code defines a custom `scatterPlot` function that configures accessors, margins, and radius, then applies it to the chart via `selection.call()`. Axes are generated with `d3.axisLeft` and `d3.axisBottom`. The view fills the entire browser window, and circular marks include tooltip titles.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed