vegalite({
width: 400,
height: 300,
data: {url: data_url},
selection: {
"highlight": {type: "single", on: "mouseover", empty: "none"},
"select": {type: "single", on:"click", empty: "none"}
},
mark: "bar",
encoding: {
x: {field: "area", type:"N"},
y: {field: "sales", type: "Q"},
color: {
condition: {selection: "highlight", value: "blue"},
value: "brown"},
opacity: {
condition: {selection: "select", value: 0.2},
value: 1},
}
})