Maybe you can help. I wanted to create a checkbox that allows you to change the background and color of the text. I got an example using checkbox and fillOpacity (the fill opacity (value between [0,1]), editor. This code does not work in Kibana (error:cannot find a selection named "Show"), changed the fields, source
"params": [{
"name": "Show",
"bind": {"input": "checkbox"}
}]
to
"selection": {
"Show": {
"type": "single",
"bind": {"input": "checkbox"}
}
}
Now the code works in Kibana and vega editor and not correct. But this is only a layout, is it technically possible to change the background and color of the entire text in the showcase?
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"config": {"view": {"stroke": "transparent"}},
"selection": {
"Show": {
"type": "single",
"bind": {"input": "checkbox"}
}
},
"data": {"values": [{"a": 28}]},
"background": "orange",
"mark": {"type": "text", "fill": "red","fontSize": 100},
"encoding": {
"fillOpacity": {
"condition": {"value": 0, "selection": "Show"},
"value": 1
},
"text": {
"field": "a",
"type": "quantitative"
}
}
}