Vega图表交互式交叉过滤器在第一个单击时填充其他图表

时间:2020-08-13 02:17:13

标签: vega-lite vega

我指的是以下vega图表示例。

https://vega.github.io/vega-lite/examples/interactive_layered_crossfilter.html

我想具有以下功能:单击图表的距离栏,然后相对于距离值加载延迟和时间

1 个答案:

答案 0 :(得分:1)

您可以通过将interval选择更改为single选择(view in editor)来做到这一点:

该链接在图表中的唯一区别是我更改了此内容:

"selection": {
  "brush": {"type": "interval", "encodings": ["x"]}
},

对此:

"selection": {
  "brush": {"type": "single", "encodings": ["x"]}
},

现在您可以通过单击选择单个条。