vega / vega-lite

A concise grammar of interactive graphics, built on Vega.
https://vega.github.io/vega-lite/
BSD 3-Clause "New" or "Revised" License
4.58k stars 598 forks source link

Continuous null takes spaces when being stacked #8909

Open yhoonkim opened 1 year ago

yhoonkim commented 1 year ago

image

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "data": {
    "values": [
      {"val2": 1, "val1": 0.9},
      {"val2": 2, "val1": 1.1},
      {"val2": 3, "val1": null}, 
    ]
  },
  "mark": "bar",
  "encoding": {
    "y": {"field": "val2", "type": "quantitative"},
    "color": {"field": "val1", "type": "quantitative"},
    "order": {"field": "val1", "type": "quantitative"}
  }
}

Since there is no null color, it is fair not to visualize. Though, the empty space is confusing for readers who may not know why it is empty by looking at the viz.

domoritz commented 1 year ago

What do you think is the right answer? The current behavior seems reasonable although a bit surprising.