2 回答

TA贡献1833条经验 获得超4个赞
您应该使用AJAX和jQuery从 Link 获取数据,如下所示:
$(document).ready(function () {
var output=[];
$.ajax('path of your link',
{
dataType: 'json', // type of response data
timeout: 500, // timeout milliseconds
success: function (data,status,xhr) { // success callback function
console.log(data);
output=data;
/** Here you have to separate data received from link into 3 different array variables which then you can use in chart code where right now you have static array. **/
},
error: function (jqXhr, textStatus, errorMessage) { // error callback
console.log('Error: ' + errorMessage);
}
});
});
- 2 回答
- 0 关注
- 284 浏览
添加回答
举报