May 2019
Beginner to intermediate
650 pages
14h 50m
English
An exponential scale, which is created with d3.scalePow(), applies an exponential transform to each value in the domain, before mapping it to the range. The default exponent is 1, which is identical to the linear scale. An exponent should be provided with the exponent() method:
const data = d3.range(0,33);const scale = d3.scalePow() .exponent(2) .domain([0,32]) .range([0,1000]);
The preceding scale (applied to the same code as the previous examples) will produce the following result:

Exponents with a value less than 1 are root functions. ...
Read now
Unlock full access