vega-lite-api

vl.pivot(pivot)

Pivot unique values to new aggregate fields.

pivot Method Overview

pivot API Reference

# pivot.groupby(…value)

The optional data fields to group by. If not specified, a single group containing all data objects will be used.

# pivot.limit(value)

An optional parameter indicating the maximum number of pivoted fields to generate. The default (0) applies no limit. The pivoted pivot names are sorted in ascending order prior to enforcing the limit. Default value: 0

# pivot.op(value)

The aggregation operation to apply to grouped value field values. Default value: sum

# pivot.pivot(value)

The data field to pivot on. The unique values of this field become new field names in the output stream.

# pivot.value(value)

The data field to populate pivoted fields. The aggregate values of this field become the values of the new pivoted fields.