Skip to content

Commit

Permalink
always have exactly two/three elements (#3782)
Browse files Browse the repository at this point in the history
* always has exactly three elements

* always have exactly two/three elements
  • Loading branch information
luizbarboza committed Oct 15, 2023
1 parent a7108de commit 3f4a2d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/d3-scale/diverging.md
@@ -1,6 +1,6 @@
# Diverging scales

Diverging scales are similar to [linear scales](./linear.md) in that they map a continuous, numeric input domain to a continuous output range. Unlike linear scales, the input domain and output range of a diverging scale always has exactly two elements, and the output range is typically specified as an interpolator rather than an array of values. Diverging scales are typically used for a color encoding; see also [d3-scale-chromatic](../d3-scale-chromatic.md). These scales do not expose [invert](./linear.md#linear_invert) and [interpolate](./linear.md#linear_interpolate) methods. There are also [log](#scaleDivergingLog), [pow](#scaleDivergingPow), and [symlog](#scaleDivergingSymlog) variants of diverging scales.
Diverging scales are similar to [linear scales](./linear.md) in that they map a continuous, numeric input domain to a continuous output range. Unlike linear scales, the input domain and output range of a diverging scale always have exactly three elements, and the output range is typically specified as an interpolator rather than an array of values. Diverging scales are typically used for a color encoding; see also [d3-scale-chromatic](../d3-scale-chromatic.md). These scales do not expose [invert](./linear.md#linear_invert) and [interpolate](./linear.md#linear_interpolate) methods. There are also [log](#scaleDivergingLog), [pow](#scaleDivergingPow), and [symlog](#scaleDivergingSymlog) variants of diverging scales.

## scaleDiverging(*domain*, *interpolator*) {#scaleDiverging}

Expand Down Expand Up @@ -30,7 +30,7 @@ If *interpolator* is an array, it represents the scale’s three-element output
const color = d3.scaleDiverging(["blue", "white", "red"]);
```

A diverging scale’s domain must be numeric and must contain exactly three values. The default domain is [0, 0.5, 1].
A diverging scale’s domain must be numeric and must contain exactly three values.

## *diverging*.interpolator(*interpolator*) {#diverging_interpolator}

Expand Down
2 changes: 1 addition & 1 deletion docs/d3-scale/sequential.md
@@ -1,6 +1,6 @@
# Sequential scales

Sequential scales are similar to [linear scales](./linear.md) in that they map a continuous, numeric input domain to a continuous output range. Unlike linear scales, the input domain and output range of a sequential scale always has exactly two elements, and the output range is typically specified as an interpolator rather than an array of values. Sequential scales are typically used for a color encoding; see also [d3-scale-chromatic](../d3-scale-chromatic.md). These scales do not expose [invert](./linear.md#linear_invert) and [interpolate](./linear.md#linear_interpolate) methods. There are also [log](#scaleSequentialLog), [pow](#scaleSequentialPow), [symlog](#scaleSequentialSymlog), and [quantile](#scaleSequentialQuantile) variants of sequential scales.
Sequential scales are similar to [linear scales](./linear.md) in that they map a continuous, numeric input domain to a continuous output range. Unlike linear scales, the input domain and output range of a sequential scale always have exactly two elements, and the output range is typically specified as an interpolator rather than an array of values. Sequential scales are typically used for a color encoding; see also [d3-scale-chromatic](../d3-scale-chromatic.md). These scales do not expose [invert](./linear.md#linear_invert) and [interpolate](./linear.md#linear_interpolate) methods. There are also [log](#scaleSequentialLog), [pow](#scaleSequentialPow), [symlog](#scaleSequentialSymlog), and [quantile](#scaleSequentialQuantile) variants of sequential scales.

## scaleSequential(*domain*, *interpolator*) {#scaleSequential}

Expand Down

0 comments on commit 3f4a2d7

Please sign in to comment.