vega-lite
vega-lite copied to clipboard
Bump Scale for bar/rect (marks with "length")
{
"marktype": "bar",
"enc": {
"x": {"type": "Q","name": "*","aggr": "count"},
"y": {"type": "O","name": "Wildlife__Species"},
"row": {"bin": true,"type": "Q","name": "Cost__Total_$"}
},
"cfg": {"dataUrl": "data/birdstrikes.json","vegaServerTable": "birdstrikes_json"}
}
Can't see bars in most plots. Some groups are missing, which I assume because there are zero tuples in those facets. However, some groups include plots but with no visible data. I can't tell if this is an error or if the values are really so small that nothing is visible. In the latter case, we should do something to ensure visibility of small (e.g., 1px) data amounts?
The correct fix is labels or tooltips. See https://github.com/uwdata/vegalite/issues/240
I disagree. You cannot mouseover a point when it's 0 pixel.
Two solutions. 1. set minimum width to 1px. 2. always add 1px to the width.
I start wondering if this should be solve in vega level?
For exactly 0 value, it should be 0px. For small number > 0, 1px?
This seems a vega level issue.
let’s punt on this for now then. — moved to should have ...
add our own scale to vg.config.scale
, call it bumpscale
Let's close this.
Run into a case where this would be useful again in the pilots.
Closing as we probably won't get to include this special scale.
It might be worth thinking if we want to do special condition like we might do for size.
https://github.com/vega/vega-lite/issues/3488
Re-open since
- we can do conditional encoding to achieve this.
- we can decouple "length" handling from size handling in #3488