d3.quantize()

d3.quantize(interpolator, n) Returns n uniformly-spaced samples from the specified interpolator, where n is an integer greater than one. The first sample is always at t = 0, and the last sample is always at t = 1. This can be useful in generating a fixed number of samples from a given interpolator, such as to derive the range of a quantize scale from a continuous interpolator. Caution: this method will not work with interpolators that do not return defensive copies of their output, such as d3

d3.queue()

d3.queue([concurrency]) Constructs a new queue with the specified concurrency. If concurrency is not specified, the queue has infinite concurrency. Otherwise, concurrency is a positive integer. For example, if concurrency is 1, then all tasks will be run in series. If concurrency is 3, then at most three tasks will be allowed to proceed concurrently; this is useful, for example, when loading resources in a web browser.

d3.quadtree()

d3.quadtree([data[, x, y]]) Creates a new, empty quadtree with an empty extent and the default x- and y-accessors. If data is specified, adds the specified array of data to the quadtree. This is equivalent to: var tree = d3.quadtree() .addAll(data); If x and y are also specified, sets the x- and y- accessors to the specified functions before adding the specified array of data to the quadtree, equivalent to: var tree = d3.quadtree() .x(x) .y(y) .addAll(data);

d3.precisionPrefix()

d3.precisionPrefix(step, value) Returns a suggested decimal precision for use with locale.formatPrefix given the specified numeric step and reference value. The step represents the minimum absolute difference between values that will be formatted, and value determines which SI prefix will be used. (This assumes that the values to be formatted are also multiples of step.) For example, given the numbers 1.1e6, 1.2e6, and 1.3e6, the step should be 1e5, the value could be 1.3e6, and the suggested

d3.quantile()

d3.quantile(array, p[, accessor]) Returns the p-quantile of the given sorted array of numbers, where p is a number in the range [0, 1]. For example, the median can be computed using p = 0.5, the first quartile at p = 0.25, and the third quartile at p = 0.75. This particular implementation uses the R-7 method, which is the default for the R programming language and Excel. For example: var a = [0, 10, 30]; d3.quantile(a, 0); // 0 d3.quantile(a, 0.5); // 10 d3.quantile(a, 1); // 30 d3.quantile(a

d3.precisionRound()

d3.precisionRound(step, max) Returns a suggested decimal precision for format types that round to significant digits given the specified numeric step and max values. The step represents the minimum absolute difference between values that will be formatted, and the max represents the largest absolute value that will be formatted. (This assumes that the values to be formatted are also multiples of step.) For example, given the numbers 0.99, 1.0, and 1.01, the step should be 0.01, the max should

d3.polygonArea()

d3.polygonArea(polygon) <> Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order (assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner), the returned area is positive; otherwise it is negative, or zero.

d3.precisionFixed()

d3.precisionFixed(step) Returns a suggested decimal precision for fixed point notation given the specified numeric step value. The step represents the minimum absolute difference between values that will be formatted. (This assumes that the values to be formatted are also multiples of step.) For example, given the numbers 1, 1.5, and 2, the step should be 0.5 and the suggested precision is 1: var p = d3.precisionFixed(0.5), f = d3.format("." + p + "f"); f(1); // "1.0" f(1.5); // "1.5" f

d3.polygonLength()

d3.polygonLength(polygon) <> Returns the length of the perimeter of the specified polygon.

d3.polygonCentroid()

d3.polygonCentroid(polygon) <> Returns the centroid of the specified polygon.