# `Visualize.Chart.Build`
[🔗](https://github.com/dcoai/Visualize/blob/v0.8.3/lib/visualize/chart/build.ex#L1)

The builder for the declarative layer (spec/14 §16, D-78).

Every function here returns a *fragment* — a design map carrying the keys that one
function sets and no others — and the pipe is `Visualize.Chart.compose/2`: a design is
the fold of its fragments, which is `Visualize.Chart.compose/1` over the list. Nothing
validates, defaults or realizes anything, so the fold is a fragment too and becomes a
chart through `Visualize.Chart.from_map/1` or an applied chart through
`Visualize.Chart.apply/2`, which is where it must validate.

What the builder adds over the literal map is the schema. Each function sets its node's
required keys from its positional arguments and takes the node's remaining keys as
`opts`, checked against `Visualize.Chart.Schema.describe/1`: an option that is not a key
of that node kind raises `ArgumentError` at the call rather than reaching the validator
as a path in a design fifty lines long. A mark's channels and options are checked the
same way against `Visualize.Chart.Schema.channels/1` and `Visualize.Chart.Schema.options/1`
of its type.

The mark, transform and scale functions are not written here: they are generated from
the schema at compile time (spec/14 §16.6, D-79), one documented function per mark type
(`line/3`, `rect/3`, …), per transform op (`bin/3`, `stack/3`, `treemap/2`, …) and per
scale kind (`linear_scale/2`, `time_scale/2`, `band_scale/2`, … — every kind takes the
suffix because `band` is a mark type as well). A type added to the schema grows the
builder with no edit to it; `mark/4` and `scale/3` remain for a type that is a value.

`var/2` declares a variable and its default under the design's `vars`;
`Visualize.Chart.var/1` builds the `%Visualize.Chart.Var{}` term that *uses* one. They
are different modules and different arities, so a caller may import both.

## Examples

    iex> import Visualize.Chart.Build
    iex> {:ok, design} =
    ...>   Visualize.Chart.compose([
    ...>     chart(meta: %{name: "Uptime"}),
    ...>     source(:primary, [:t, :v]),
    ...>     cartesian(),
    ...>     time_scale(:x),
    ...>     linear_scale(:y, domain: [0, :auto]),
    ...>     axis(:x, :bottom, ticks: 4),
    ...>     line(:primary, %{x: :t, y: :v}),
    ...>     title(["Uptime"])
    ...>   ])
    iex> design.marks
    [%{type: :line, data: "primary", channels: %{x: "t", y: "v"}}]
    iex> design.frames["main"].scales
    %{"x" => %{kind: :time}, "y" => %{kind: :linear, domain: [0, :auto]}}
    iex> {:ok, _chart} = Visualize.Chart.from_map(design)

# `data`

```elixir
@type data() :: atom() | map()
```

A mark's data: a source name, or the `:data` node `from/1` starts (spec/14 §5.4).

# `fragment`

```elixir
@type fragment() :: %{optional(atom()) =&gt; term()}
```

A design map carrying the keys one builder function sets (spec/14 §16.1).

# `opts`

```elixir
@type opts() :: keyword() | map()
```

A node's remaining keys, as a keyword list or a map.

# `adopt`

```elixir
@spec adopt(atom(), atom()) :: fragment()
```

As `adopt/3` reading the same name in the other frame (spec/14 §4.3).

# `adopt`

```elixir
@spec adopt(atom(), atom(), atom()) :: fragment()
```

A scale adopted from another frame (spec/14 §4.3, #384): this frame reads `frame`'s
`scale` under `name`, so the node is said once and the domain is shared, while the
range stays this frame's own.

    iex> import Visualize.Chart.Build
    iex> in_frame(:day, [adopt(:y, :year)])
    [%{frames: %{day: %{scales: %{y: {:frame, :year, :y}}}}}]

# `arc`

```elixir
@spec arc(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:arc` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `value`. Optional channels: `start`, `end`, `inner`, `outer`, `series`. Options: `inner_radius`, `outer_radius`, `corner_radius`, `pad_angle`, `start_angle`, `end_angle`. 

# `area`

```elixir
@spec area(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:area` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`, `y`. Optional channels: `x0`, `x1`, `y0`, `y1`, `series`. Options: `closed`. 

# `axis`

```elixir
@spec axis(atom(), atom()) :: fragment()
```

As `axis/3` with no options.

# `axis`

```elixir
@spec axis(atom(), atom(), opts()) :: fragment()
```

One axis of the frame, drawing `scale` on `side` (spec/14 §4.4).

# `band`

```elixir
@spec band(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:band` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x0`, `x1`. Optional channels: `y`, `series`. Options: `height`. 

# `band_scale`

```elixir
@spec band_scale(atom(), opts()) :: fragment()
```

A `:band` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `bin`

```elixir
@spec bin(data(), term(), opts()) :: map()
```

A `:bin` step appended to a data node (spec/14 §5.4).

`bin(data, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `thresholds`, `as`. 

# `cartesian`

```elixir
@spec cartesian() :: fragment()
```

As `cartesian/2` under the name `:main`, with no options.

# `cartesian`

```elixir
@spec cartesian(atom() | opts()) :: fragment()
```

A `:cartesian` frame (spec/14 §4.1).

`opts` are the frame's keys; its scales, axes and legend are their own fragments
(`scale/3`, `axis/3`, `legend/2`). A frame carries no size — the render gives it (§4.2).

# `cartesian`

```elixir
@spec cartesian(atom(), opts()) :: fragment()
```

A named `:cartesian` frame (spec/14 §4.1): a design holds its frames by name, and a
design that declares one names it `:main` unless it says otherwise.

# `chart`

```elixir
@spec chart() :: fragment()
```

As `chart/1` with no options.

# `chart`

```elixir
@spec chart(opts()) :: fragment()
```

The seed a design is folded onto: the current schema version (spec/14 §9).

`opts` are the remaining keys of the `:design` node (spec/14 §2.1).

# `choose`

```elixir
@spec choose(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:choose` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`, `y`. Optional channels: `series`. 

# `chord`

```elixir
@spec chord(data(), term(), term(), opts()) :: map()
```

A `:chord` step appended to a data node (spec/14 §5.4).

`chord(data, fields, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `size`, `padding`, `output`, `nodes`, `id`. 

# `circle`

```elixir
@spec circle(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:circle` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`, `y`. Optional channels: `value`, `series`. Options: `radius`. 

# `cluster`

```elixir
@spec cluster(data(), opts()) :: map()
```

A `:cluster` step appended to a data node (spec/14 §5.4).

`cluster(data, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `id`, `by`, `field`, `size`, `output`, `orientation`, `link`. 

# `contour`

```elixir
@spec contour(data(), term(), term(), opts()) :: map()
```

A `:contour` step appended to a data node (spec/14 §5.4).

`contour(data, field, size, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `thresholds`. 

# `defaults`

```elixir
@spec defaults(map()) :: fragment()
```

The design's `defaults` (spec/14 §3.8, §16.2): a style's parts every element inherits
under its style, and an entry per mark type. A frame's, a mark's, a label's and an axis's
are their functions' `defaults:` option.

    iex> Visualize.Chart.Build.defaults(%{stroke: %{width: 2}, line: %{stroke: %{width: 1.5}}})
    %{defaults: %{stroke: %{width: 2}, line: %{stroke: %{width: 1.5}}}}

# `delaunay`

```elixir
@spec delaunay(data(), term(), opts()) :: map()
```

A `:delaunay` step appended to a data node (spec/14 §5.4).

`delaunay(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `output`. 

# `density`

```elixir
@spec density(data(), term(), opts()) :: map()
```

A `:density` step appended to a data node (spec/14 §5.4).

`density(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `field`, `size`, `bandwidth`, `thresholds`. 

# `diverging_scale`

```elixir
@spec diverging_scale(atom(), opts()) :: fragment()
```

A `:diverging` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `facet`

```elixir
@spec facet() :: fragment()
```

As `facet/1` with no options.

# `facet`

```elixir
@spec facet(atom() | opts()) :: fragment()
```

A `:facet` frame (spec/14 §4.6).

`by:` and `columns:`, the keys of the `:facet` node, are lifted into the frame's `facet`
key: a `:facet` frame and its `facet` node name the same thing.

# `facet`

```elixir
@spec facet(atom(), opts()) :: fragment()
```

A named `:facet` frame (spec/14 §4.6).

# `filter`

```elixir
@spec filter(data(), term(), opts()) :: map()
```

A `:filter` step appended to a data node (spec/14 §5.4).

`filter(data, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `test`, `value`. 

# `fold`

```elixir
@spec fold(data(), term(), opts()) :: map()
```

A `:fold` step appended to a data node (spec/14 §5.4).

`fold(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `as`. 

# `force`

```elixir
@spec force(data(), term(), opts()) :: map()
```

A `:force` step appended to a data node (spec/14 §5.4).

`force(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `field`, `size`, `output`, `nodes`, `id`, `strength`, `distance`, `alpha`, `ticks`. 

# `from`

```elixir
@spec from(atom()) :: map()
```

The `:data` node of a mark reading `source` (spec/14 §5.4) — a node, not a fragment.

It carries no `transforms` key, so a mark that reads its source directly and one built
by `from/1` alone are the same map; the generated appenders — one per transform op (spec/14 §16.6) — add the steps.

# `geo`

```elixir
@spec geo() :: fragment()
```

As `geo/1` with no options.

# `geo`

```elixir
@spec geo(atom() | opts()) :: fragment()
```

A `:geo` frame (spec/14 §4.6).

The projection is the frame's `projection:` key, a `:projection` node.

# `geo`

```elixir
@spec geo(atom(), opts()) :: fragment()
```

A named `:geo` frame (spec/14 §4.1).

# `gradient`

```elixir
@spec gradient(atom(), :linear | :radial) :: fragment()
```

As `gradient/3` with no options.

# `gradient`

```elixir
@spec gradient(atom(), :linear | :radial, opts()) :: fragment()
```

One named paint under `defs` (spec/14 §2.7): a gradient of the type, `opts` its remaining
keys. `stops:` takes `%{at, color, opacity}` maps, or `{at, color}` and
`{at, color, opacity}` tuples, which read as the maps.

    iex> Visualize.Chart.Build.gradient(:area, :linear, stops: [{0, :series_1, 0.8}, {1, :series_1, 0.1}])
    %{defs: %{area: %{type: :linear, stops: [%{at: 0, color: :series_1, opacity: 0.8}, %{at: 1, color: :series_1, opacity: 0.1}]}}}

# `hexbin`

```elixir
@spec hexbin(data(), term(), opts()) :: map()
```

A `:hexbin` step appended to a data node (spec/14 §5.4).

`hexbin(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `radius`, `size`, `output`. 

# `in_frame`

```elixir
@spec in_frame(atom(), [fragment()]) :: [fragment()]
```

The fragments, each in the frame `name` (spec/14 §16.3, #383).

The frame functions take a name — `cartesian/2`, `polar/2` — but `scale/3`, `axis/3`,
`legend/2` and the generated scale functions declare the design's one frame, and a named
twin of each would double the builder's surface for no new meaning. This says it once:
each fragment's frame is renamed to `name`, and every mark and every label it carries is
given `frame: name` unless it already says one (spec/14 §5.1, §6.1). A list in and a list
out, so it stands in a fold where its fragments would.

    iex> import Visualize.Chart.Build
    iex> in_frame(:now, [polar(), linear_scale(:r, domain: [0, 4]), line(:load, %{x: :t, y: :v})])
    [
      %{frames: %{now: %{kind: :polar}}},
      %{frames: %{now: %{scales: %{r: %{kind: :linear, domain: [0, 4]}}}}},
      %{marks: [%{type: :line, data: :load, channels: %{x: :t, y: :v}, frame: :now}]}
    ]

A fragment carrying more than one frame raises `ArgumentError`: this function says which
frame a thing belongs to, and a fragment already holding two has nothing to be told.

# `interaction`

```elixir
@spec interaction(opts()) :: fragment()
```

How the chart behaves beside others on a page (spec/14 §2.9, #466): `sync:` names the
group whose charts share hover, `frame:` the frame whose `x` it reads.

    iex> Visualize.Chart.Build.interaction(sync: "dash-42")
    %{interaction: %{sync: "dash-42"}}

# `label`

```elixir
@spec label(term(), list()) :: fragment()
```

As `label/3` with no options.

# `label`

```elixir
@spec label(term(), list(), opts()) :: fragment()
```

One label of the frame: a text at an anchor (spec/14 §6.1).

# `layout`

```elixir
@spec layout(opts()) :: fragment()
```

The grid the design's frames are placed on (spec/14 §2.8, #384): `columns` and `rows`
as weights, `gap` in pixels between cells. A frame takes its place with `cell:`.

    iex> Visualize.Chart.Build.layout(columns: [4, 3, 2, 1], gap: 8)
    %{layout: %{columns: [4, 3, 2, 1], gap: 8}}

# `legend`

```elixir
@spec legend(atom()) :: fragment()
```

As `legend/2` with no options.

# `legend`

```elixir
@spec legend(atom(), opts()) :: fragment()
```

The frame's legend, explaining `scale` (spec/14 §4.5).

# `line`

```elixir
@spec line(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:line` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`, `y`. Optional channels: `series`. Options: `closed`. 

# `linear_scale`

```elixir
@spec linear_scale(atom(), opts()) :: fragment()
```

A `:linear` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `log_scale`

```elixir
@spec log_scale(atom(), opts()) :: fragment()
```

A `:log` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `lttb`

```elixir
@spec lttb(data(), term(), term(), opts()) :: map()
```

A `:lttb` step appended to a data node (spec/14 §5.4).

`lttb(data, fields, n, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. 

# `m4`

```elixir
@spec m4(data(), term(), term(), opts()) :: map()
```

A `:m4` step appended to a data node (spec/14 §5.4).

`m4(data, fields, width, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. 

# `mark`

```elixir
@spec mark(atom(), data(), opts() | Visualize.Chart.Var.t()) :: fragment()
```

As `mark/4` with no options.

# `mark`

```elixir
@spec mark(atom(), data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

One mark of the design (spec/14 §5.1): a type, its data, its channels.

`data` is a source name or the `:data` node `from/1` starts. A key of `channels` that is
not a channel of the type, and a key of an `options:` option that is not an option of the
type, raise `ArgumentError` (spec/14 §5.2, §5.3); a `%Visualize.Chart.Var{}` standing for
the whole node passes through unchecked. Which required channels a node must carry is the
validator's word, not the builder's (D-69, D-78).

# `needle`

```elixir
@spec needle(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:needle` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`. Optional channels: `y`, `series`. Options: `inner_radius`, `width`, `tail`, `hub`, `cap`. 

# `ordinal_scale`

```elixir
@spec ordinal_scale(atom(), opts()) :: fragment()
```

A `:ordinal` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `pack`

```elixir
@spec pack(data(), opts()) :: map()
```

A `:pack` step appended to a data node (spec/14 §5.4).

`pack(data, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `id`, `by`, `field`, `size`, `output`, `padding`. 

# `paint`

```elixir
@spec paint(atom()) :: {:paint, atom()}
```

The value a `:color` key takes to refer to a gradient of `defs` (spec/14 §3.2).

    iex> Visualize.Chart.Build.paint(:area)
    {:paint, :area}

# `partition`

```elixir
@spec partition(data(), opts()) :: map()
```

A `:partition` step appended to a data node (spec/14 §5.4).

`partition(data, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `id`, `by`, `field`, `size`, `output`, `padding`. 

# `path`

```elixir
@spec path(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:path` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `path`. Optional channels: `series`. 

# `percentile_band`

```elixir
@spec percentile_band(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:percentile_band` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`, `median`. Optional channels: `inner_lo`, `inner_hi`, `outer_lo`, `outer_hi`. 

# `polar`

```elixir
@spec polar() :: fragment()
```

As `polar/1` with no options.

# `polar`

```elixir
@spec polar(atom() | opts()) :: fragment()
```

A `:polar` frame (spec/14 §4.6): `angle` and `r` are its scales.

# `polar`

```elixir
@spec polar(atom(), opts()) :: fragment()
```

A named `:polar` frame (spec/14 §4.1).

# `power_scale`

```elixir
@spec power_scale(atom(), opts()) :: fragment()
```

A `:power` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `projection`

```elixir
@spec projection(data(), term(), opts()) :: map()
```

A `:projection` step appended to a data node (spec/14 §5.4).

`projection(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `field`. 

# `quantile_scale`

```elixir
@spec quantile_scale(atom(), opts()) :: fragment()
```

A `:quantile` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `quantize_scale`

```elixir
@spec quantize_scale(atom(), opts()) :: fragment()
```

A `:quantize` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `radial_scale`

```elixir
@spec radial_scale(atom(), opts()) :: fragment()
```

A `:radial` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `rect`

```elixir
@spec rect(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:rect` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x0`, `x1`, `y0`, `y1`. Optional channels: `value`, `series`. Options: `corner_radius`. 

# `rose`

```elixir
@spec rose(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:rose` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `angle`. Optional channels: `value`, `series`. Options: `width`, `inner_radius`, `outer_radius`, `pad_angle`. 

# `rule`

```elixir
@spec rule(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:rule` mark, as `mark/4` of that type (spec/14 §5.2).

Optional channels: `x`, `y`, `series`. 

# `sankey`

```elixir
@spec sankey(data(), term(), term(), opts()) :: map()
```

A `:sankey` step appended to a data node (spec/14 §5.4).

`sankey(data, fields, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `size`, `padding`, `output`, `nodes`, `id`. 

# `scale`

```elixir
@spec scale(atom(), atom()) :: fragment()
```

As `scale/3` with no options.

# `scale`

```elixir
@spec scale(atom(), atom(), opts()) :: fragment()
```

One declared scale of the frame (spec/14 §4.3); `opts` are its remaining keys.

# `sequential_scale`

```elixir
@spec sequential_scale(atom(), opts()) :: fragment()
```

A `:sequential` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `sort`

```elixir
@spec sort(data(), term(), opts()) :: map()
```

A `:sort` step appended to a data node (spec/14 §5.4).

`sort(data, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `order`. 

# `source`

```elixir
@spec source(atom(), [atom()]) :: fragment()
```

As `source/3` with no options.

# `source`

```elixir
@spec source(atom(), [atom()], opts()) :: fragment()
```

One typed slot under `sources` (spec/14 §2.3): the fields the design reads from it.

`opts` are the slot's remaining keys, `default:` among them.

# `spectrum`

```elixir
@spec spectrum(data(), term(), opts()) :: map()
```

A `:spectrum` step appended to a data node (spec/14 §5.4).

`spectrum(data, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `time`, `every`, `samples`, `window`, `detrend`, `as`. 

# `sqrt_scale`

```elixir
@spec sqrt_scale(atom(), opts()) :: fragment()
```

A `:sqrt` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `stack`

```elixir
@spec stack(data(), term(), opts()) :: map()
```

A `:stack` step appended to a data node (spec/14 §5.4).

`stack(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `order`, `offset`. 

# `style`

```elixir
@spec style(atom(), opts()) :: fragment()
```

As `style/3` with no further keys.

# `style`

```elixir
@spec style(atom(), opts(), opts()) :: fragment()
```

One named style under `styles` (spec/14 §3.1).

`keys` and `opts` are both style keys, `opts` merged over `keys`; every one is checked. A
style is written in its parts — `fill:`, `stroke:`, `font:` — or in the flat keys of an
earlier version, which are moved into their parts (spec/14 §9, D-172).

    iex> Visualize.Chart.Build.style(:series, stroke: %{color: :series_1, width: 2})
    %{styles: %{series: %{stroke: %{type: :solid, color: :series_1, width: 2}}}}
    iex> Visualize.Chart.Build.style(:series, stroke: :series_1, stroke_width: 2)
    %{styles: %{series: %{stroke: %{type: :solid, color: :series_1, width: 2}}}}

# `sum`

```elixir
@spec sum(data(), term(), opts()) :: map()
```

A `:sum` step appended to a data node (spec/14 §5.4).

`sum(data, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `by`, `as`. 

# `symbol`

```elixir
@spec symbol(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:symbol` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`, `y`. Optional channels: `value`, `series`. 

# `symlog_scale`

```elixir
@spec symlog_scale(atom(), opts()) :: fragment()
```

A `:symlog` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `take`

```elixir
@spec take(data(), term(), opts()) :: map()
```

A `:take` step appended to a data node (spec/14 §5.4).

`take(data, n, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `side`. 

# `text`

```elixir
@spec text(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:text` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x`, `y`. Optional channels: `value`, `series`. 

# `theme`

```elixir
@spec theme(atom() | map()) :: fragment()
```

The design's theme: a name, or an inline `:theme` node (spec/14 §2.5).

# `threshold_scale`

```elixir
@spec threshold_scale(atom(), opts()) :: fragment()
```

A `:threshold` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `tiles`

```elixir
@spec tiles(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:tiles` mark, as `mark/4` of that type (spec/14 §5.2).

# `time_scale`

```elixir
@spec time_scale(atom(), opts()) :: fragment()
```

A `:time` scale declared under the frame, as `scale/3` of that kind (spec/14 §4.3).

# `title`

```elixir
@spec title(list()) :: fragment()
```

As `title/2` with no options.

# `title`

```elixir
@spec title(list(), opts()) :: fragment()
```

The design's title: `label/3` at the `:title` anchor (spec/14 §6.3).

# `tree`

```elixir
@spec tree(data(), opts()) :: map()
```

A `:tree` step appended to a data node (spec/14 §5.4).

`tree(data, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `id`, `by`, `field`, `size`, `output`, `orientation`, `link`. 

# `treemap`

```elixir
@spec treemap(data(), opts()) :: map()
```

A `:treemap` step appended to a data node (spec/14 §5.4).

`treemap(data, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `id`, `by`, `field`, `size`, `output`, `padding`, `tile`. 

# `var`

```elixir
@spec var(atom(), term()) :: fragment()
```

As `var/3` with no options.

# `var`

```elixir
@spec var(atom(), term(), opts()) :: fragment()
```

The *declaration* of a variable and its default under `vars` (spec/14 §2.4).

`Visualize.Chart.var/1` builds the term that uses one; this declares it.

# `voronoi`

```elixir
@spec voronoi(data(), term(), opts()) :: map()
```

A `:voronoi` step appended to a data node (spec/14 §5.4).

`voronoi(data, fields, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `size`, `output`. 

# `window`

```elixir
@spec window(data(), term(), opts()) :: map()
```

A `:window` step appended to a data node (spec/14 §5.4).

`window(data, field, opts)`, with `data` a node `from/1` started or a source name, read as `from/1`
of it. Its remaining keys: `from`, `to`, `latest`. 

# `x_band`

```elixir
@spec x_band(data(), opts() | Visualize.Chart.Var.t(), opts()) :: fragment()
```

A `:x_band` mark, as `mark/4` of that type (spec/14 §5.2).

Required channels: `x0`, `x1`. Optional channels: `series`. 

---

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