Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Scale

Public visualization

Viewing a saved revision (read-only)

c64c9aff8b1c4ca9babefdc21d922449

D3 Scale

0 stars1🌍 Public
SSubhendu Karmakar
Last edited Dec 27, 2023
Created on Dec 27, 2023

This example demonstrates how D3 scales map input data to visual output, using a linear scale to position circles along the x-axis and a multi-domain color scale to assign fill colors. The circles represent values from -10 to 10, with colors transitioning from red through gray to blue. It renders as an SVG using d3.scaleLinear for both positioning and color interpolation, with data bound through d3.select and .join(). The code references D3 v7 scale types in utils.js, including scaleTime, scaleBand, and scaleOrdinal, though only linear scales are actively applied.

AI-generated description

D3 Scales - scaleTime()