d3最重要的莫过于数据。那么数据如何获取呢?当然可以用d3.json 咯。下面就用过例子来看看d3.json吧。
var params = storageUrl.split(";");
var demoUrl = Settings.apiUrl + "/lte_dashboard/lteDashboard?"
+ "bl=" + escape(params[0])
+ "&branch=" + escape(params[1])
+ "&stage=" + escape(params[2])
+ "&begin=" + startDate.unix()
+ "&end=" + endDate.unix();
d3.json(demoUrl, function(indata) {
//do things what you want to do
console.log("-----"+"%j", indata)
});