VegaLite.layers

You're seeing just the function layers, go back to VegaLite module for more information.

Specs

layers(t(), [t()]) :: t()

Builds a layered multi-view specification from the given list of single view specifications.

Examples

Vl.new()
|> Vl.data_from_values(...)
|> Vl.layers([
  Vl.new()
  |> Vl.mark(:line)
  |> Vl.encode_field(:x, ...)
  |> Vl.encode_field(:y, ...),
  Vl.new()
  |> Vl.mark(:rule)
  |> Vl.encode_field(:y, ...)
  |> Vl.encode(:size, value: 2)
])

Vl.new()
|> Vl.data_from_values(...)
# Note: top-level data, encoding, transforms are inherited
# by the child views unless overriden
|> Vl.encode_field(:x, ...)
|> Vl.layers([
  ...
])

See the docs for more details.