vega-lite-api

vl.stack(stack)

Compute running sums to stack groups of values.

stack Method Overview

stack API Reference

# stack.as(…value)

Output field names. This can be either a string or an array of strings with two elements denoting the name for the fields for stack start and stack end respectively. If a single string(e.g., "val") is provided, the end field will be "val_end".

# stack.groupby(…value)

The data fields to group by.

# stack.offset(value)

Mode for stacking marks. One of "zero" (default), "center", or "normalize". The "zero" offset will stack starting at 0. The "center" offset will center the stacks. The "normalize" offset will compute percentage values for each stack point, with output values in the range [0,1].

Default value: "zero"

# stack.sort(…value)

Field that determines the order of leaves in the stacked charts.

# stack.stack(value)

The field which is stacked.