Can someone explain to me the following line in the vincent docs for a stacked bar:
https://github.com/wrobstory/vincent/blob/master/examples/stacked_bar_examples.py
y2=ValueRef(field='y2', scale='y')
I don't see any field called "y2" in the data set so I am confused as to where it is coming from
The
y2field is generated by the Vegastacktransform (code here).In Vega, Therectmark can be defined byy+y2ory+height. See Marks#Shared Visual Properties in Vega's docs:Check out the stacked bar demo in the Vega Live Editor, which includes:
Try changing
y2withheightin the live editor.