Skip to contents

Add TimeUnitTransform to a vega-lite spec.

Usage

vl_timeunit(spec, as = NULL, field = NULL, timeUnit = NULL, .object = NULL)

Arguments

spec

An input vega-lite spec

as

The output field to write the timeUnit value.

field

The data field to apply time unit.

timeUnit

The timeUnit.

.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: TimeUnitTransform

Value

A modified Vega-Lite Spec