Skip to main content
100%

scalePoint() in action

✓ Published1🌍 Public
SSubhendu Karmakar
Last edited Dec 28, 2023
Created on Dec 27, 2023

Five orange dots mark Monday through Friday along a horizontal line using a point scale, with each dot positioned by its day value. The `d3.scalePoint()` API maps the categorical domain to a continuous pixel range, and the console logs the scale's `step()` method to reveal the uniform spacing between points. The example renders in SVG within a 700-by-240 pixel canvas, using D3 v7 and data from a hardcoded array of weekday objects.

AI-generated description

D3 Scales - scaleTime()

MIT Licensed

Similar vizzes