# MarkFacet

Auto-generated from the config schema in the source. See the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Provided by the `marks` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/marks/src/LinearMarkDisplay/markFacetConfigSchema.ts).

The mark display's `facet`: the [Facet](../facet) the feature and alignments
displays take, one labelled section of the track per value of a field, plus
the steps the facet runs separately over each section's features, after the
display's `transform` and before every mark's `transform`. A `pileup` here
packs each section into separate rows, and every mark then draws in them. A
string is the field; with no field the steps run over the one section there
is.

## Example usage

```js
{
  type: 'LinearMarkDisplay',
  facet: { field: 'tags.HP',transform: [{ type: 'pileup' }] },
  marks: [{ mark: 'rect' }],
}
```

## Related links

- **Base config:** [SectionFacet](../sectionfacet)

## Config slots

A setting written to it names members one by one: a member left out stays as it is, and `null` resets one. One that changes `field` first clears `sort`, `hidden`, which name the old values, except those it states. Slot types (`fileLocation`, `frozen`, ...) are explained in the [config slot types reference](https://jbrowse.org/jb2/docs/config_guides/slot_types). Slots a base configuration contributes are listed here too, so this table is the whole surface.

| Slot | Description |
| --- | --- |
| **transform**<br>[list of MarkTransform entries](../marktransform) | Steps that run separately over each section's features, after the display's `transform` and before any mark's `transform`: a `pileup` here packs each section into separate rows, and every mark draws in them. |
| <span class="slot-group">Inherited from [SectionFacet](../sectionfacet) | <span class="slot-group-count">1 slot |
| **hidden**<br>[`stringArray`](https://jbrowse.org/jb2/docs/config_guides/slot_types#stringarray) of strings or numbers = <code>[]</code> | The keys of the sections hidden from the stack, as a section chip's Hide writes them; "Show all" clears it. |
| <span class="slot-group">Inherited from [Facet](../facet) | <span class="slot-group-count">2 slots |
| **field**<br>[`featureField`](https://jbrowse.org/jb2/docs/config_guides/slot_types#featurefield) = <code>''</code> | A feature field, or on a row display a row attribute, whose values each get a labelled section of the track: a field name, a dotted path into a structured field (`INFO.SVTYPE`, a read's `tags.HP`), a `jexl:` expression, or `strand`. A feature with no value stacks last, under `field: none` (`(no value)` for a `jexl:` field, whose sections show the value alone). The variant display's row attribute is a sample attribute, and the mark displays' is `group`, their `rows.groups`. The alignments displays also take a read dimension here: `firstOfPairStrand`, `pairOrientation`, `pairing`, `split`, `spliced`, `mapq`, `mateRefName` or `mateAssembly`. Writing `facet: "strand"` sets this slot. |
| **sort**<br>[`stringArray`](https://jbrowse.org/jb2/docs/config_guides/slot_types#stringarray) of strings or numbers = <code>[]</code> | The values whose sections stack first, in order, as Vega-Lite's `sort` lists them: the rest follow sorted, and none is dropped. Empty stacks every section sorted, and a `strand` facet forward, reverse, then unstranded (`1`, `-1`, `0`). |

