May 2019
Beginner to intermediate
650 pages
14h 50m
English
A logarithmic scale, which is created with d3.scaleLog(), applies a logarithmic transform to each value in the domain, before mapping it to the range. The domain of a logarithmic function doesn't include zero (it can only be strictly positive or strictly negative). The default base is 10:
const data = d3.range(1,33);const scale = d3.scaleLog() .domain([1,32]) .range([0,1000]);
The preceding code, when applied to the same axis that was used in previous examples, generates the following visualization:

You can configure logarithmic scales with ...
Read now
Unlock full access