VegaLite.datasets_from_values
You're seeing just the function
datasets_from_values
, go back to VegaLite module for more information.
Specs
datasets_from_values(t(), Enumerable.t()) :: t()
Specifies top-level datasets.
Datasets can be used as a data source further in the specification.
This is useful if you need to refer to the data in multiple places
or use a transform/2
like :lookup
.
Datasets should be a key-value enumerable, where key is the dataset
name and value is tabular data as in data_from_values/3
.
Examples
results = [
%{"category" => "A", "score" => 28},
%{"category" => "B", "score" => 55}
]
points = [
%{"x" => "1", "y" => 10},
%{"x" => "2", "y" => 100}
]
Vl.new()
|> Vl.datasets_from_values(results: results, points: points)
# Use one of the data sets as the primary data
|> Vl.data(name: "results")
|> ...
See the docs for more details.