-
Notifications
You must be signed in to change notification settings - Fork 0
Quantitative Scales
Scales are functions that map from an input domain to an output range. Quantitative scales have a continuous domain, such as the set of real numbers, or dates. There are also ordinal scales, which have a discrete domain, such as a set of names or categories. Scales are an optional feature in D3; you don't have to use them, if you prefer to do the math yourself. However, using scales can greatly simplify the code needed to map a dimension of data to a visual representation.
# d3.scale.linear()
# linear.invert(y)
# linear.domain([values])
# linear.range([values])
# linear.rangeRound(values)
# linear.interpolate([interpolator])
# linear.clamp([boolean])
# linear.ticks([count])
# linear.tickFormat([count])
# d3.scale.sqrt()
# d3.scale.pow()
# pow.invert(y)
# pow.domain([values])
# pow.range([values])
# pow.rangeRound(values)
# pow.interpolate([interpolator])
# pow.clamp([boolean])
# pow.ticks([count])
# pow.tickFormat([count])
# d3.scale.log()
# log.invert(y)
# log.domain([values])
# log.range([values])
# log.rangeRound(values)
# log.interpolate([interpolator])
# log.clamp([boolean])
# log.ticks()
# log.tickFormat()
# d3.scale.quantize()
# quantize.domain([values])
# quantize.range([values])
# d3.scale.quantile()
# quantile.domain([values])
# quantile.range([values])
# quantile.quantiles()