Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Scale Invert() in action

Public visualization

Viewing a saved revision (read-only)

0ccee42b16d54cf28c8da5c543886284

D3 Scale Invert() in action

0 stars1🌍 Public
SSubhendu Karmakar
Last edited Dec 27, 2023
Created on Dec 27, 2023
Forked from D3 Scale

A linear scale with a domain of -50 to 50 and a range of 0 to 600 pixels is drawn as an SVG axis. A grey clickable band beneath the axis uses d3.pointer to capture the mouse position, and linearScale.invert() converts that pixel coordinate back into a data value, displaying the precise number in a text label. The example demonstrates the inverse mapping capability of d3.scaleLinear in an interactive way.

AI-generated description

D3 Scales - scaleTime()