Is it possible to set select boxes for each graph in group mark?

Is that possible to have select boxes in each graph when I have multiple graphs using group mark?

sample view from Vega examples titled "Quantile-Quantile Plot Example".

I want to make each signal applies to one particular graph located just above like an image below.

You can add controls like that to a dashboard, with the input-control visualization.

e.g. https://www.elastic.co/blog/interactive-inputs-on-kibana-dashboards

I don't believe you can add two sliders and have each tied to a single graph without affecting the query of the other.

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}
            }
          }
        }
      ]
    },
   {
    .
    .
    }
  ]

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.