[英]vega-lite: Adjustable selection?
Vega-Lite does not provide any way to create an interval selection with a size that is adjustable by clicking and dragging on the edges. Vega-Lite 不提供任何方法来创建具有可通过单击和拖动边缘进行调整的大小的间隔选择。
Available configuration properties are listed in the interval selection docs . 间隔选择文档中列出了可用的配置属性。 The only configurable interactions are
translate
, which enables moving the selection by clicking and dragging, and zoom
, which enables changing the selection's size by zooming on its interior;唯一可配置的交互是
translate
,它可以通过单击和拖动来移动选择,以及zoom
,它可以通过缩放内部来改变选择的大小; both of these are True by default.默认情况下,这两个都是 True 。
Here is a simple specification that lets you see the effect of these configurations ( open in editor ):这是一个简单的规范,可让您查看这些配置的效果( 在编辑器中打开):
{
"data": {"url": "data/sp500.csv"},
"mark": "area",
"selection": {
"brush": {
"type": "interval",
"encodings": ["x"],
"zoom": true,
"translate": true
}
},
"encoding": {
"x": {"field": "date", "type": "temporal"},
"y": {"field": "price", "type": "quantitative"}
},
"width": 400
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.