本文介紹了谷歌圖表錯(cuò)誤:b.L 不是函數(shù)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
我使用 Google API 制作了一個(gè)包含 3 個(gè)圖形的小頁(yè)面.
I did a little page with 3 graphics using the Google API.
一切正常.然而,從一個(gè)時(shí)刻到另一個(gè)崩潰.
Everything worked perfectly. However from one moment to the other crashed.
在該位置的圖表中出現(xiàn)此消息:bL 不是函數(shù)
In the chart of the place appears this message: bL is not the function
有人可以向我解釋為什么會(huì)發(fā)生這種情況嗎?
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>
這就是它的工作方式.
從一個(gè)時(shí)刻到另一個(gè)時(shí)刻都是如此.
From one moment to the other was so.
推薦答案
感謝大家的回復(fù).
我改了
<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>
它對(duì)我來(lái)說(shuō)很好.
很奇怪,但事實(shí)是它確實(shí)有效.
Is very strange, but the truth is that it was working.
這篇關(guān)于谷歌圖表錯(cuò)誤:b.L 不是函數(shù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!