band.rangeRound()

band.rangeRound([range]) Sets the scale’s range to the specified two-element array of numbers while also enabling rounding. This is a convenience method equivalent to: band .range(range) .round(true); Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the shape-rendering “crispEdges” styles.

band.range()

band.range([range]) If range is specified, sets the scale’s range to the specified two-element array of numbers. If the elements in the given array are not numbers, they will be coerced to numbers. If range is not specified, returns the scale’s current range, which defaults to [0, 1].

band.paddingOuter()

band.paddingOuter([padding]) If padding is specified, sets the outer padding to the specified value which must be in the range [0, 1]. If padding is not specified, returns the current outer padding which defaults to 0. The outer padding determines the ratio of the range that is reserved for blank space before the first band and after the last band.

band.paddingInner()

band.paddingInner([padding]) If padding is specified, sets the inner padding to the specified value which must be in the range [0, 1]. If padding is not specified, returns the current inner padding which defaults to 0. The inner padding determines the ratio of the range that is reserved for blank space between bands.

band.padding()

band.padding([padding]) A convenience method for setting the inner and outer padding to the same padding value. If padding is not specified, returns the inner padding.

band.domain()

band.domain([domain]) If domain is specified, sets the domain to the specified array of values. The first element in domain will be mapped to the first band, the second domain value to the second band, and so on. Domain values are stored internally in a map from stringified value to index; the resulting index is then used to determine the band. Thus, a band scale’s values must be coercible to a string, and the stringified version of the domain value uniquely identifies the corresponding band

band.copy()

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

band.bandwidth()

band.bandwidth() Returns the width of each band.

band.align()

band.align([align]) If align is specified, sets the alignment to the specified value which must be in the range [0, 1]. If align is not specified, returns the current alignment which defaults to 0.5. The alignment determines how any leftover unused space in the range is distributed. A value of 0.5 indicates that the leftover space should be equally distributed before the first band and after the last band; i.e., the bands should be centered within the range. A value of 0 or 1 may be used to

band()

band(value) Given a value in the input domain, returns the start of the corresponding band derived from the output range. If the given value is not in the scale’s domain, returns undefined.