altair.StackTransform

class altair.StackTransform(groupby=Undefined, stack=Undefined, offset=Undefined, sort=Undefined, **kwds)

StackTransform schema wrapper

Mapping(required=[stack, groupby, as])

Attributes
groupbyList(FieldName)

The data fields to group by.

stackFieldName

The field which is stacked.

offsetenum(‘zero’, ‘center’, ‘normalize’)

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"

sortList(SortField)

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

asanyOf(FieldName, List([FieldName, FieldName]))

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".

__init__(groupby=Undefined, stack=Undefined, offset=Undefined, sort=Undefined, **kwds)

Methods

__init__([groupby, stack, offset, sort])

copy([deep, ignore])

Return a copy of the object

from_dict(dct[, validate, _wrapper_classes])

Construct class from a dictionary representation

from_json(json_string[, validate])

Instantiate the object from a valid JSON string

resolve_references([schema])

Resolve references in the context of this object's schema or root schema.

to_dict([validate, ignore, context])

Return a dictionary representation of the object

to_json([validate, ignore, context, indent, ...])

Emit the JSON representation for this object as a string.

validate(instance[, schema])

Validate the instance against the class schema in the context of the rootschema.

validate_property(name, value[, schema])

Validate a property against property schema in the context of the rootschema