Skip to content

Commit fd18371

Browse files
Filmbostock
andauthored
document facet: super (#1300)
Co-authored-by: Mike Bostock <mbostock@gmail.com>
1 parent 2985d2a commit fd18371

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,10 @@ Faceting can be explicitly enabled or disabled on a mark with the *mark*.**facet
582582
* *auto* (default) - automatically determine if this mark should be faceted
583583
* *include* (or true) - draw the subset of the mark’s data in the current facet
584584
* *exclude* - draw the subset of the mark’s data *not* in the current facet
585-
* null (or false) - repeat this mark’s data across all facets (i.e., no faceting)
585+
* *super* - draw this mark in a single frame that covers all facets
586+
* null (or false) - repeat this mark’s data across all facets (*i.e.*, no faceting)
587+
588+
When a mark uses *super* faceting, it is not allowed to use position scales (*x*, *y*, *fx*, or *fy*); *super* faceting is intended for decorations, such as labels and legends.
586589

587590
When top-level faceting is used, the default *auto* setting is equivalent to *include* when the mark data is strictly equal to the top-level facet data; otherwise it is equivalent to null. When the *include* or *exclude* facet mode is chosen, the mark data must be parallel to the top-level facet data: the data must have the same length and order. If the data are not parallel, then the wrong data may be shown in each facet. The default *auto* therefore requires strict equality (`===`) for safety, and using the facet data as mark data is recommended when using the *exclude* facet mode. (To construct parallel data safely, consider using [*array*.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on the facet data.)
588591

0 commit comments

Comments
 (0)