我有一个谷歌饼图,每 5 秒刷新一次。每次刷新时,饼图都会扩大。然后在 5-6 次刷新后它消失了。我在所有浏览器中都面临这个问题。请告知
/**
* Function for Google PieChart
**/
function drawVisualization() {
// Create and populate the data table.
var data = google.visualization.arrayToDataTable([
// dynamic data
]);
// Create and draw the visualization.
new google.visualization.PieChart(document.getElementById('visualization')).
draw(data, {title:"So, how was your day?"});
}
/*
*Extjs Pannel for Pie Chart
**/
{xtype:'label',
id:'pannelid',
width:'100%',
html : '<table width="100%"><tr><tr> <td> <div id="visualization" align="left"> </div></td></tr></table>'
}
/**
*For refreshing Pie Chart every 5 sec
**/
setInterval(function(){
drawVisualization();
},5000);