Skip to contents

Add FoldTransform to a vega-lite spec.

Usage

vl_fold(spec, fold = NULL, as = NULL, .object = NULL)

Arguments

spec

An input vega-lite spec

fold

An array of data fields indicating the properties to fold.

as

The output field names for the key and value properties produced by the fold transform. Default value: ["key", "value"]

.object

Directly input an object, rather than creating one via the other arguments. Should not be used in conjunction with the other arguments other than spec. Objects can be of type: FoldTransform

Value

A modified Vega-Lite Spec