Vega-lite: Setting size of errorbar removes the ticks

Created on 15 May 2020  路  8Comments  路  Source: vega/vega-lite

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"}
      }
    }
  ]
}
Area - Macro / Composite Mark Bug P3

All 8 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paintdog picture paintdog  路  4Comments

ijlyttle picture ijlyttle  路  4Comments

kanitw picture kanitw  路  3Comments

kanitw picture kanitw  路  4Comments

infai-feineis picture infai-feineis  路  3Comments