This website is for Vega-Lite v3. Go to the main Vega-Lite homepage for the latest release.

Transformation

Edit this page

Data transformations in Vega-Lite are described via either view-level transforms (the transform property) or field transforms inside encoding (bin, timeUnit, aggregate, sort, and stack).

When both types of transforms are specified, the view-level transforms are executed first based on the order in the array. Then the inline transforms are executed in this order: bin, timeUnit, aggregate, sort, and stack.

View-level Transform Property

{
  "data": ... ,
  "transform": [
     ...
  ],
  "mark": ... ,
  "encoding": ... ,
  ...
}

The View-level transform object is an array of objects describing transformations. The transformations are executed in the order in which they are specified in the array. Vega-Lite’s transform supports the following types of transformations: