Skip to main content
100%

d3js Exercice 2 - Scales

✓ Published0🌍 Public
JJeromeMouly
Last edited Oct 10, 2017
Created on Oct 10, 2017

This example demonstrates how d3.scaleLinear maps input values from a domain to a range, showing the output for inputs of 0, 10, and 20, then extending beyond the interval to reveal unbounded behavior. It then applies the clamp(true) method to the scale, which restricts outputs for out-of-range values like -10 and 200. Built with D3 v4, the code writes results directly to the document via document.writeln, and comments suggest experimenting with invert, power, log scales, or a color range.

AI-generated description

d3js Exercice 2 - Scales

forked from <a href='http://bl.ocks.org/AlainRo/'>AlainRo</a>'s block: <a href='http://bl.ocks.org/AlainRo/d7b7518300065d666827b39460745b26'>d3js Exercice 2 - scales</a>

mit Licensed

Similar vizzes