tile.translate()

tile.translate([translate]) If translate is specified, sets this tile layout’s translate to the specified two-element array of numbers [x, y] and returns this tile layout. If translate is not specified, returns the current layout translate.

tile.size()

tile.size([size]) If size is specified, sets this tile layout’s size to the specified two-element array of numbers [width, height] and returns this tile layout. If size is not specified, returns the current layout size. This is a convenience method equivalent to setting the extent to [[0, 0], [width, height]].

tile.scale()

tile.scale([scale]) If scale is specified, sets this tile layout’s scale to the specified number scale and returns this tile layout. If scale is not specified, returns the current layout scale.

tile.extent()

tile.extent([extent]) If extent is specified, sets this tile layout’s extent to the specified array of points [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner, and returns this tile layout. If extent is not specified, returns the current layout extent.

tile()

tile() Computes the set of 256x256 quadtree tiles to display given the current layout extent, scale and translate. Returns an array of objects with the following properties: x The integer X coordinate of the tile address. Periodic if wrap is set to true. y The integer Y coordinate of the tile address. z The integer Z coordinate of the tile address (zoom level). tx The X translate to be applied to the tile. This is the x value multiplied by 256, but without wrapping logic applied. ty The Y

threshold.range()

threshold.range([range]) If range is specified, sets the scale’s range to the specified array of values. If the number of values in the scale’s domain is N, the number of values in the scale’s range must be N+1. If there are fewer than N+1 elements in the range, the scale may return undefined for some inputs. If there are more than N+1 elements in the range, the additional values are ignored. The elements in the given array need not be numbers; any value or type will work. If range is not sp

threshold.invertExtent()

threshold.invertExtent(value) Returns the extent of values in the domain [x0, x1] for the corresponding value in the range, representing the inverse mapping from range to domain. This method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. For example: var color = d3.scaleThreshold() .domain([0, 1]) .range(["red", "white", "green"]); color.invertExtent("red"); // [undefined, 0] color.invertExtent("white"); //

threshold.domain()

threshold.domain([domain]) If domain is specified, sets the scale’s domain to the specified array of values. The values must be in sorted ascending order, or the behavior of the scale is undefined. The values are typically numbers, but any naturally ordered values (such as strings) will work; a threshold scale can be used to encode any type that is ordered. If the number of values in the scale’s range is N+1, the number of values in the scale’s domain must be N. If there are fewer than N ele

threshold.copy()

threshold.copy() Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa.

threshold()

threshold(value) Given a value in the input domain, returns the corresponding value in the output range. For example: var color = d3.scaleThreshold() .domain([0, 1]) .range(["red", "white", "green"]); color(-1); // "red" color(0); // "white" color(0.5); // "white" color(1); // "green" color(1000); // "green"