How can one change mark properties (not field encodings or values) with vega-lite selections ?
For example, to highlight selected bars with a layer mark {type: bar, fill: none, stroke, black}.
I think I found an answer in the interactive bar select highlight example
It may not be directly possible to change mark properties via selection but one can conditionally set fillOpacity and strockWidth encodings channel with a selection.
Releveant piece of code is :
"fillOpacity": {
"condition": {"selection": "select", "value": 1},
"value": 0.3
},
"strokeWidth": {
"condition": [
{
"test": {
"and": [
{"selection": "select"},
"length(data(\"select_store\"))"
]
},
"value": 2
},
{"selection": "highlight", "value": 1}
],
"value": 0
}