vegalite({
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"data": {"values": point_image},
"layer": [
{
"selection": {"brush": {"type": "interval", "encodings": ["x"]}},
"mark": "bar",
"encoding": {
"x": {"field": "country", "type": "ordinal"},
"y": {
"aggregate": "mean",
"field": "price",
"type": "quantitative"
},
"opacity": {
"condition": {"selection": "brush", "value": 1},
"value": 0.7
}
}
},
{
"transform": [{"filter": {"selection": "brush"}}],
"mark": "rule",
"encoding": {
"y": {
"aggregate": "mean",
"field": "price",
"type": "quantitative"
},
"color": {"value": "firebrick"},
"size": {"value": 3}
}
}
]
})