Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/445.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 谷歌图表中特定数据的浏览器崩溃_Javascript_Google Visualization - Fatal编程技术网

Javascript 谷歌图表中特定数据的浏览器崩溃

Javascript 谷歌图表中特定数据的浏览器崩溃,javascript,google-visualization,Javascript,Google Visualization,var timeType=“year”,data=JSON.parse({“cols”:[{“label”:“year”,“type”:“string”},{“label”:“扫描成功”,“type”:“number”},{“label”:“扫描失败”,“type”:“number”},{“label”:“扫描已拒绝”,“type”:“number”},““rows”:[{“c”:[{“v”:0,“f”:2016},{“v”:5},{“v”:0},{“v”:3},{“c”:“{“v”:1”,“f

var timeType=“year”,data=JSON.parse({“cols”:[{“label”:“year”,“type”:“string”},{“label”:“扫描成功”,“type”:“number”},{“label”:“扫描失败”,“type”:“number”},{“label”:“扫描已拒绝”,“type”:“number”},““rows”:[{“c”:[{“v”:0,“f”:2016},{“v”:5},{“v”:0},{“v”:3},{“c”:“{“v”:1”,“f”:2015},{“v”:0”},{“v”:0},{,{“v”:0},{“v”:0},{“v”:0},{“c”:[{“v”:3,“f”:2013},{“v”:0},{“v”:0},{“v”:0},{“c”:[{“v”:4,“f”:2012},{“v”:0},{“v”:0},{“c”:[{“v”:5,“f”:2011},{“v”:0},{“v”:0},{“v”:;
load('current',{'packages':['corechart']});
google.charts.setOnLoadCallback(chartReady);
函数chartredy(){
chartData=新的google.visualization.DataTable(数据);
chart=newGoogle.visualization.ComboChart(document.getElementById('comboMonthScan');
图表。绘图(图表数据{
序列类型:“条”,
图表区:{
“宽度”:“90%”,
“高度”:“80%”
},
图例:{
“位置”:“顶部”
}
});
}


我自己找到了解决方案:其他值是有效的,因为作为文本标签(f)我使用了一个字符串。我想填写年份,但它被转换为数字。这似乎会使浏览器崩溃,因为Google Charts无法将此数字视为字符串。

感谢您的跟进。当提供数字而不是字符串时,问题是一个无限循环。此问题将在下一版本中避免。