hvega-0.12.0.7: tests/specs/conditional/selectionCondition2.vl
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {
"url": "https://vega.github.io/vega-lite/data/cars.json"
},
"encoding": {
"color": {
"condition": {
"aggregate": "count",
"field": "*",
"selection": {
"and": [
"alex",
"morgan"
]
},
"type": "quantitative"
},
"value": "gray"
},
"x": {
"field": "Cylinders",
"type": "ordinal"
},
"y": {
"field": "Origin",
"type": "ordinal"
}
},
"mark": {
"cursor": "grab",
"type": "rect"
},
"selection": {
"alex": {
"on": "[mousedown[!event.shiftKey], mouseup] > mousemove",
"translate": "[mousedown[!event.shiftKey], mouseup] > mousemove",
"type": "interval"
},
"morgan": {
"mark": {
"fill": "#fdbb84",
"fillOpacity": 0.5,
"stroke": "#e34a33"
},
"on": "[mousedown[event.shiftKey], mouseup] > mousemove",
"translate": "[mousedown[event.shiftKey], mouseup] > mousemove",
"type": "interval"
}
}
}