Utility functions for working with layered plots.
Summary
Functions
Appends the given layer or layers to the input specification.
Prepends the given layer or layers to the input specification.
Converts a single view plot to a layered plot.
Functions
@spec append(vl :: VegaLite.t(), VegaLite.t() | [VegaLite.t()]) :: VegaLite.t()
Appends the given layer or layers to the input specification.
If no layer exists in the input spec, a new layer object will be added
with the encoding and mark options of the input spec.
Raises if the input vl is not a single view or layered specification.
@spec prepend(vl :: VegaLite.t(), VegaLite.t() | [VegaLite.t()]) :: VegaLite.t()
Prepends the given layer or layers to the input specification.
If no layer exists in the input spec, a new layer object will be added
with the encoding and mark options of the input spec.
Raises if the input vl is not a single view or layered specification.
@spec to_layered(vl :: VegaLite.t()) :: VegaLite.t()
Converts a single view plot to a layered plot.
encoding, mark and data will be extracted and added to a new layer.