【发布时间】:2016-10-25 08:35:11
【问题描述】:
我想使用 json 变量传递数据。 在下面的示例中,json 是从外部 JSON 文件中获取的。 任何人都可以帮助我如何从局部变量传递数据,因为我是 dc.js 的新手
queue()
.defer(d3.json, "sampledata.json") // sampledata.json is an external json file
.await(makeGraphs);
function makeGraphs() {
//function which proceses the data
}
我试过了
var sampledata = [ ....];
queue().defer(d3.json, "sampledata.json") // sampledata.json is an external json file
.await(makeGraphs);
function makeGraphs() {
//function which proceses the data
}
但没用。
【问题讨论】:
标签: javascript json d3.js dc.js queue.js