Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Scale - ScaleTime

Public visualization

Fork of D3 Scale - ScaleTime

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

This example demonstrates how D3’s `scaleTime()` maps dates to x-coordinates along a linear time axis. It plots four circles at quarterly intervals between January 2016 and January 2017, positioning them at y=200 while labeling each with its full date string. The visualization uses an SVG canvas, with data bound via D3’s selection join (`selectAll().data().join()`). The scale’s domain spans one year, and its range runs from x=60 to x=900, making temporal spacing explicit. The code imports `scaleTime` from D3’s scales module.

AI-generated description

D3 Scales - scaleTime()

Comments

Sign in to join the discussion.

MIT Licensed