gosling.js
gosling.js copied to clipboard
Better encoding support for lollipop sticks
Currently, we use a bar
mark that encodes y
with a nominal field in combination with range
. We are manually specifying y offsets in the range and reversing it to center-align marks as a workaround, e.g.,
mark: 'bar',
y: { field: 'sig', type: 'nominal', domain: [c1, c2, c3, ...], range: [220, 20] },
ye: { value: 100 }
The bar
mark at least needs to treat nominal fields differently than quantitative fields (e.g., different alignment). We could instead incorporate another mark, e.g., rule
.
cc @manzt