Skip to main content
100%

Gist 51fecbcad3c5a744b1a96ad079f2c210

✓ Published0🌍 Public
RRonolibert
Last edited Jun 16, 2017
Created on Jun 16, 2017

This example demonstrates the behavior of D3’s `scaleLinear` function, showing how a numeric input domain of [0, 1] maps to an output range of [0, 100]. It prints the scaled results for values 0.5, 0.75, 0, 1, and 2, revealing that the mapping is continuous and extends beyond the specified domain. The code imports the scale from `d3-scale` (via the `d3` namespace) and logs each conversion to the console, making the linear transformation’s direct proportionality clear.

AI-generated description

Similar vizzes