Open kanitw opened 3 years ago
In https://github.com/vega/vega-lite/pull/7684, we can't add xOffset encoding inside quantitative x scale at all.
However, it might make sense to do something like this to draw error bar:
encoding: { x: {aggregate: 'mean', 'field': 'value'}, y: {field: 'category'} }, layer: [{ mark: 'circle', }, { mark: 'rule', encoding: { xOffset: {aggregate: 'stdev', field: 'value'}, xOffset2: {aggregate: 'stdev', field: 'value', multiply: -1} // also need to add `multiply` like in Vega? } }]
Here is a stack overflow question that looks related.
https://stackoverflow.com/questions/74021286/showing-gaps-in-ordinal-time-based-data-in-vega-lite?noredirect=1#comment130713049_74021286
It seems that xOffset doesn't properly support temporal datatypes (which is continuous but also logically discrete at the same time as there are only 4 quarters).
In https://github.com/vega/vega-lite/pull/7684, we can't add xOffset encoding inside quantitative x scale at all.
However, it might make sense to do something like this to draw error bar: