我一直在使用谷歌饼图和 jquery Ajax.Load()
我的问题是饼图仅在 ajax 加载调用返回后才加载,这完全没有抓住重点,让页面加载(包括图表),然后异步加载大量内容。
http://code.google.com/apis/chart/interactive/docs/gallery/piechart.html
饼图通过以下方式加载:
google.setOnLoadCallback(drawChart);
Ajax 调用如下:
$("#id").load(url, function(response, status, xhr) {
if (status == "error") {
alert(xhr.status + " " + xhr.statusText);
}
else {
$("#id").show();
}
});
我怎样才能在 ajax 加载完成之前使谷歌饼图加载发生?