vega / vega-lite

A concise grammar of interactive graphics, built on Vega.
https://vega.github.io/vega-lite/
BSD 3-Clause "New" or "Revised" License
4.68k stars 611 forks source link

Using "clear" in a selection when binding to legend fails #6553

Open rashishtandon opened 4 years ago

rashishtandon commented 4 years ago

When using "clear" in a multi selection binding to the legend, we're seeing an error message t.events is not iterable in the Vega editor

The selection part of the spec looks like

"selection": {
        "gpuid": {
          "type": "multi",
          "fields": ["z"],
          "bind": "legend",
          "toggle": "true",
          "clear": "click"
        }
      }

For full spec, see here

domoritz commented 4 years ago

The behavior we are going for here is to be able to clear the selection when the user clicks outside the legend. However, the behavior is not as I expected it when toggle is set to "true". See https://github.com/vega/vega-lite/issues/6556 for details.