

Vega-Lite automatically infers data types in many cases as discussed below. It can also be a "geojson" type for encoding ‘geoshape’. The type of measurement ( "quantitative", "temporal", "ordinal", or "nominal") for the encoded field or constant value ( datum). 2) field is not required if aggregate is count. See more details about escaping in the field documentation. If field names contain dots or brackets but are not nested, you can use \\ to escape dots and brackets (e.g., "a\\.b" and "a\\").

) and brackets ( ) can be used to access nested objects (e.g., "field": "foo.bar" and "field": "foo"). A string defining the name of the field from which to pull a data value or an object defining iterated values from the repeat operator. To facilitate data exploration, Vega-Lite also provides inline field transforms ( aggregate, bin, sort, stack, and timeUnit) as a part of a field definition in addition to the top-level transform.Īll field definitions support the following properties: Property To encode a particular field in the data set with an encoding channel, the channel’s field definition must describe the field name and its data type. Datum definition, which describes a constant data value encoded via a scale.įield Definition // Specification of a Single View.Value definition, which describes an encoded constant visual value.

