I am trying to make errorbars a bit thicker. Using sizein encoding works, but removes the ticks. The json below (modified from https://vega.github.io/vega-lite/docs/errorbar.html) gives no ticks as expeced when testing in https://vega.github.io/editor/
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {"url": "data/barley.json"},
"layer": [
{
"mark": {"type": "errorbar", "ticks": true},
"encoding": {
"x": {
"field": "yield",
"type": "quantitative",
"scale": {"zero": false}
},
"y": {"field": "variety", "type": "ordinal"},
"size": {"value": "2"}
}
},
{
"mark": {"type": "point", "filled": true, "color": "black"},
"encoding": {
"x": {"field": "yield", "type": "quantitative", "aggregate": "mean"},
"y": {"field": "variety", "type": "ordinal"}
}
}
]
}
Thank you for reporting the bug. This looks like a bug in the normalizer.
@chanwutk do you want to fix this one?
Right now, setting size in encoding also set the size of the ticks.
Here I change the color of ticks to red.
Should setting size in encoding only affects the bar width or should we add other property to only set the size of the bar?
I think it should set the size of the ticks and the rule between the ticks.
Do you mean the thickness of the ticks?
Yes, thickness of both of them.
See https://github.com/vega/vega-lite/pull/6502#issuecomment-631653916, I think it's better to add thickness as mark property and always drop size encoding from error bar.