# `Expresso.Element.Frame`
[🔗](https://github.com/rellen/expresso/blob/main/lib/expresso/element/frame.ex#L1)

A frame of a chart or of a tree: its data at one point in time

The `frame` entity takes a label as its argument, such as `"2024"`, and it
holds one `series` entity for each series of the chart. Each frame after
the first takes one step, and the marks of the chart move from the values
of one frame to the values of the next. `Expresso.Element.Chart` checks the
frames and draws them, and `docs/reference/chart-element.md` gives the
rules.

The transform of the chart puts the series of the first frame into the
`elements` field of the chart, so that `reveal` and `dim` work as for a
chart without frames. `Expresso.Overlay.Expand` writes the steps of each
frame into its `steps` field.

A frame of a chart of flows can hold `flow` entities in place of a series.
`Expresso.Element.Chart.check/1` changes them into one series.

A frame of a tree holds `node` entities in place of a series: the whole
tree at that point in time. `Expresso.Element.Hierarchy` checks and draws them.

# `t`

```elixir
@type t() :: %Expresso.Element.Frame{
  __spark_metadata__: term(),
  at: Expresso.Overlay.t() | nil,
  elements: [Expresso.Element.Series.t() | Expresso.Element.Node.t()],
  flows: term(),
  label: String.t(),
  steps: [pos_integer()] | nil
}
```

The struct of a frame

---

*Consult [api-reference.md](api-reference.md) for complete listing*
