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

Vega chart interactive crossfilter populate other charts on click of first

我指的是下面的织女星图表示例。

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

我想要这样的功能,当点击图表的 distance bar 时,delay 和 time 被加载距离值。

您可以通过将 interval selection 更改为 single selection (view in editor):

图表中 link 的唯一区别是我更改了这个:

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

对此:

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

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