Vega lite 有没有办法知道Vega lite正在加载?
我正在使用Vega lite加载一个相当大的.csv文件,所以通常需要一段时间,什么也不显示。 我想知道是否有办法知道vega lite当前正在加载,因此我可以在加载之前将loading.gif嵌入到绘图中 例如,在此饼图中:Vega lite 有没有办法知道Vega lite正在加载?,vega-lite,Vega Lite,我正在使用Vega lite加载一个相当大的.csv文件,所以通常需要一段时间,什么也不显示。 我想知道是否有办法知道vega lite当前正在加载,因此我可以在加载之前将loading.gif嵌入到绘图中 例如,在此饼图中: var PiChart = { "width": 200, "height": 200, "description": "Donut chart with embedded da
var PiChart = {
"width": 200,
"height": 200,
"description": "Donut chart with embedded data.",
"data": {"url": "tweets.csv"},
"mark": {"type": "arc", "innerRadius": 30},
"encoding": {
"theta": {"aggregate": "count", "field": "sentiment"},
"color": {
"field": "sentiment",
"type": "nominal",
"scale": {
"domain": ["VERY_NEGATIVE", "NEGATIVE", "NEUTRAL", "POSITIVE", "VERY_POSITIVE", "NOT_UNDERSTOOD"],
"range": ["#003f5c", "#58508d", "#bc5090", "#ff6361", "#ffa600", "#c7c7c7"]
},
},
"tooltip": [{"aggregate":"count", "field": "sentiment", "type": "quantitative"}, {"field": "sentiment", "type": "ordinal"}]
},
"view": {"stroke": null}
};