gosling.js icon indicating copy to clipboard operation
gosling.js copied to clipboard

Better encoding support for lollipop sticks

Open sehilyi opened this issue 2 years ago • 0 comments

166952921-3f3a1bf5-b5c2-475e-9540-3c7136e92b5f

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

sehilyi avatar May 05 '22 17:05 sehilyi