hvega-0.5.0.0: tests/specs/conditional/selectionCondition5.vl
{
"mark": {
"cursor": "grab",
"type": "rect"
},
"data": {
"url": "https://vega.github.io/vega-lite/data/cars.json"
},
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"selection": {
"mySelection": {
"empty": "none",
"clear": "mouseup",
"type": "interval",
"translate": "[mousedown[!event.shiftKey], mouseup] > mousemove",
"on": "[mousedown[!event.shiftKey], mouseup] > mousemove"
}
},
"encoding": {
"color": {
"value": "gray",
"condition": {
"field": "*",
"aggregate": "count",
"selection": "mySelection",
"type": "quantitative"
}
},
"x": {
"field": "Cylinders",
"type": "ordinal"
},
"y": {
"field": "Origin",
"type": "ordinal"
}
}
}