# `Macaw.Frame.Summary.Table`
[🔗](https://github.com/dcoai/macaw_frame/blob/v0.1.0/lib/macaw/frame/summary/table.ex#L1)

The data-table fallback of a realized Frame (spec/11 §4), copied from visualize's
`Visualize.Chart.Summary.Table`: the rows each data layer draws, one `<table>` per
layer, each value written as the summary writes it (§2.4), for the Frame's markup to
place **beside** its root, never inside it, visually hidden and still read.
`Macaw.Frame.Summary.table/2` is its public face.

- **Each table** has a `<caption>` (the summary's name, then `: <slot>` when there are
  several tables, then `(the first n of m rows)` when cut short), a header row of
  `<th scope="col">` cells named by field (the field's schema label where its slot has
  one) and a row of cells per row; an absent value is an empty cell, all text escaped.
- **The columns** of a stacked layer are its series, its position field and its value;
  of a layout, the fields its inline label reads and the field it is sized by; of
  parallel coordinates, the polyline's `id`, its `dimension` and the reading the
  `parallel` step placed; of a diagram's items (spec/13 §7.3: a layered graph's nodes
  and edges, a sequence's messages, a Gantt chart's tasks, a timeline's events), the
  item's own fields among `id`, `source`, `target`, `from`, `to`, `label`, `kind`,
  `section`, `period`, `t`, `start` and `end`, whether or not the layer is a data
  layer; of any
  other layer, the fields its label reads, then its channels' fields in the order
  `series`, `x`, `x0`, `x1`, `y`, `y0`, `y1`, `angle`, `r`, `start`, `end`, `inner`,
  `outer`, `value`, `median`, a channel only when it reads through a scale (or a
  geographic frame's projection) or is a series or a share. A layer with no column has
  no table, and a layer whose table repeats another's is left out.
- **It reads the delivery's packed columns**, only the rows it shows, through
  `Macaw.Frame.Columns.read/3` with a window, never a row through
  `Macaw.Data.Table.get/2`; at most `limit:` rows a table (`1000`).

# `html`

```elixir
@spec html(term(), term()) :: {:ok, iodata()} | {:error, [{list(), term()}, ...]}
```

The tables of a realized Frame as HTML (§4): `{:ok, iodata}`. Options: `hidden:`
(`true`, the stylesheet's `mw-frame-hidden` class), `caption:` (the summary's name),
`limit:` (`1000`), `context:` (the render's `Macaw.Component.Context`, the value's by
default, for the tables' ids). A value with no drawing has no table: `{:ok, []}`.

---

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