You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* rect support for band scales
* band hint if only one value
* more band scale support
* band rect docs
* Update docs/marks/rect.md
Co-authored-by: Philippe Rivière <[email protected]>
---------
Co-authored-by: Philippe Rivière <[email protected]>
Copy file name to clipboardExpand all lines: docs/marks/bar.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ const timeseries = [
26
26
# Bar mark
27
27
28
28
:::tip
29
-
The bar mark is one of several marks in Plot for drawing rectangles; it should be used when one dimension is ordinal and the other is quantitative. See also [rect](./rect.md) and [cell](./cell.md).
29
+
The bar mark is a variant of the [rect mark](./rect.md)for use when one dimension is ordinal and the other is quantitative. See also the [cell mark](./cell.md).
30
30
:::
31
31
32
32
The **bar mark** comes in two orientations: [barY](#barY) extends vertically↑ as in a vertical bar chart or column chart, while [barX](#barX) extends horizontally→. For example, the bar chart below shows the frequency of letters in the English language.
Copy file name to clipboardExpand all lines: docs/marks/cell.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ onMounted(() => {
21
21
# Cell mark
22
22
23
23
:::tip
24
-
The cell mark is one of several marks in Plot for drawing rectangles; it should be used when both dimensions are ordinal. See also [bar](./bar.md) and [rect](./rect.md).
24
+
The cell mark is a variant of the [rect mark](./rect.md)for use when both dimensions are ordinal. See also the [bar mark](./bar.md).
25
25
:::
26
26
27
27
The **cell mark** draws rectangles positioned in two ordinal dimensions. Hence, the plot’s *x* and *y* scales are [band scales](../features/scales.md). Cells typically also have a **fill** color encoding.
Copy file name to clipboardExpand all lines: docs/marks/rect.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,10 +26,6 @@ onMounted(() => {
26
26
27
27
# Rect mark
28
28
29
-
:::tip
30
-
The rect mark is one of several marks in Plot for drawing rectangles; it should be used when both dimensions are quantitative. See also [bar](./bar.md) and [cell](./cell.md).
31
-
:::
32
-
33
29
The **rect mark** draws axis-aligned rectangles defined by **x1**, **y1**, **x2**, and **y2**. For example, here we display geographic bounding boxes of U.S. counties represented as [*x1*, *y1*, *x2*, *y2*] tuples, where *x1* & *x2* are degrees longitude and *y1* & *y2* are degrees latitude.
@@ -199,7 +195,7 @@ The following channels are optional:
199
195
***x2** - the ending horizontal position; bound to the *x* scale
200
196
***y2** - the ending vertical position; bound to the *y* scale
201
197
202
-
Typically either **x1**and **x2**are specified, or **y1**and **y2**, or both.
198
+
If **x1**is specified but **x2**is not specified, then *x* must be a *band* scale; if **y1**is specified but **y2** is not specified, then *y* must be a *band* scale.
203
199
204
200
If an **interval** is specified, such as d3.utcDay, **x1** and **x2** can be derived from **x**: *interval*.floor(*x*) is invoked for each **x** to produce **x1**, and *interval*.offset(*x1*) is invoked for each **x1** to produce **x2**. The same is true for **y**, **y1**, and **y2**, respectively. If the interval is specified as a number *n*, **x1** and **x2** are taken as the two consecutive multiples of *n* that bracket **x**. Named UTC intervals such as *day* are also supported; see [scale options](../features/scales.md#scale-options).
0 commit comments