Hi @thomasneirynck
I wonder if I could put "signals" into marks which type is group using Vega.
The query for select boxes, "signals" is mentioned outside of marks in this example.
"signals": [
.
.
{
"name": "numQuantiles", "value": 100,
"bind": {"input": "range", "min": 20, "max": 200, "step": 1}
},
{
"name": "url",
"value": "data/normal-2d.json",
"bind": {
"input": "select",
"options": [
"data/normal-2d.json",
"data/uniform-2d.json"
]
}
}
],
Is this possible to move into group mark below, so that the query would only apply to a specific graph?
"marks": [
{
"type": "group",
"encode": {
"update": {
"width": {"signal": "plotWidth"},
"height": {"signal": "plotWidth"}
}
},
"signals": [
{"name": "width", "update": "plotWidth"}
],
"scales": [
{
"name": "x",
"domain": [0, 1],
"range": "width"
}
],
"axes": [
{
"scale": "y",
"orient": "left",
"offset": 10,
"grid": true,
"title": "Empirical Data Quantiles"
},
{
"scale": "x",
"orient": "bottom",
"grid": true,
"title": "Theoretical Uniform Quantiles"
}
],
"marks": [
{
"type": "symbol",
"from": {"data": "quantiles"},
"encode": {
"update": {
"x": {"scale": "x", "field": "quniform"},
"y": {"scale": "y", "field": "value"},
"fill": {"value": "steelblue"},
"size": {"value": 16}
}
}
}
]
},
{
.
.
}
]