本文介紹了谷歌圖表錯誤:b.L 不是函數的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我使用 Google API 制作了一個包含 3 個圖形的小頁面.
I did a little page with 3 graphics using the Google API.
一切正常.然而,從一個時刻到另一個崩潰.
Everything worked perfectly. However from one moment to the other crashed.
在該位置的圖表中出現此消息:bL 不是函數
In the chart of the place appears this message: bL is not the function
有人可以向我解釋為什么會發生這種情況嗎?
Does someone can explain to me why this happens?
我的例子工作:
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script>
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Date');
data.addColumn('number', '2015');
data.addColumn('number', '2014');
data.addRows([
['Jan', 197680, 241921],
['Fev', 183619,205572],
['Mar', 205643,214666],
['Abr', 205643,202097],
['Mai', 0,210007],
['Jun', 0,202434],
['Jul', 0,217502],
['Ago', 0,175038],
['Set', 0,206510],
['Out', 0,209802],
['Nov', 0,197122],
['Dez', 0,162796]
]);
var options = {
title: 'Energia 2014/2015',
titleTextStyle: {color: 'white', fontSize: '18'},
chart_M: 'function',
legend: {textStyle: {color: 'white'}},
colors: ['#0099FF', '#11334c'],
backgroundColor: "transparent",
hAxis: {title: '',
textStyle: {
color: '#C8C8C8'
}},
vAxis: {title: '',
textStyle: {
color: '#C8C8C8'
}}
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_energy'));
chart.draw(data, options);
}
</script>
這就是它的工作方式.
從一個時刻到另一個時刻都是如此.
From one moment to the other was so.
推薦答案
感謝大家的回復.
我改了
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
為此:
<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['corechart']}]}"></script>
它對我來說很好.
很奇怪,但事實是它確實有效.
Is very strange, but the truth is that it was working.
這篇關于谷歌圖表錯誤:b.L 不是函數的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!