我指的是以下vega图表示例。
https://vega.github.io/vega-lite/examples/interactive_layered_crossfilter.html
我想具有以下功能:单击图表的距离栏,然后相对于距离值加载延迟和时间。
答案 0 :(得分:1)
您可以通过将interval
选择更改为single
选择(view in editor)来做到这一点:
该链接在图表中的唯一区别是我更改了此内容:
"selection": {
"brush": {"type": "interval", "encodings": ["x"]}
},
对此:
"selection": {
"brush": {"type": "single", "encodings": ["x"]}
},
现在您可以通过单击选择单个条。