[英]Set default values of brushed data on x-axis with dates
我正在https://vega.github.io/vega-lite/examples/interactive_overview_detail.html處使用 Overview and Detail Vega-Lite 示例
我正在嘗試為概覽圖 x 軸上的刷過數據設置默認值。
我已經為這樣的點選擇和日期做了這個:
"params": [{
"name": "index",
"value": [{"x": {"year": 2008, "month": 2, "date": 1}}],
"select": {
"type": "point",
"encodings": ["x"],
"on": "mouseover",
"nearest": true
}
}],
但我似乎無法在一段時間內獲得正確的語法。
對指定的“X” value
使用一個數組。 你可以 go 到你想要的任何時間單位級別。
"params": [
{
"name": "brush",
"value":
{"x": [{"year": 2007, "month": 7},
{"year": 2009, "month": 6}]}
,
"select": {
"type": "interval",
"encodings": ["x"]
}
}
],
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.