VegaLite.facet
You're seeing just the function
facet
, go back to VegaLite module for more information.
Specs
Builds a facet multi-view specification from the given single-view template.
Facet definition must be either a field definition or a row/column mapping.
Note that you can also create facet graphics by using
the :facet
, :column
and :row
encoding channels.
Examples
Vl.new()
|> Vl.data_from_values(...)
|> Vl.facet(
[field: "country"],
Vl.new()
|> Vl.mark(:bar)
|> Vl.encode_field(:x, ...)
|> Vl.encode_field(:y, ...)
)
Vl.new()
|> Vl.data_from_values(...)
|> Vl.facet(
[
row: [field: "country", title: "Country"],
column: [field: "year", title: "Year"]
]
Vl.new()
|> Vl.mark(:bar)
|> Vl.encode_field(:x, ...)
|> Vl.encode_field(:y, ...)
)
See the docs for more details.