🌍 Public
Viewing a saved revision (read-only)
c684b00cf552493a8b8d6242e1d8ca2b
D3 Scale Invert() in action
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