2016-02-28 86 views
0

誰知道,Google註釋圖表出錯了?它現在不工作。我得到註釋Google圖表錯誤

Uncaught TypeError: Cannot read property 'prototype' of null 

在我的控制檯。谷歌庫中的這個錯誤,而不是在我的代碼中。

回答

1

我認爲谷歌正在更新註解圖表API

Testcode:https://jsfiddle.net/lecaoquochung/dsmgL9wj/15/

或谷歌文檔頁面 https://developers.google.com/chart/interactive/docs/gallery/annotationchart

enter image description here

附:我今天(20160229)與上述testcode遇到了同樣的錯誤

Uncaught TypeError: Cannot read property 'prototype' of null 
O 
(anonymous function) 
e 
google.a.c.Xc 
google.a.c.Oa 
google.a.Oa 
(anonymous function) 

更新20160301(它捉迷藏到昨天爲止,我還沒有固定的代碼東西不斷更新。):谷歌已經更新圖表包爲版本44

google.charts.load('44', {'packages':['annotationchart'], 'language': 'ja'}); 

Testcode:https://jsfiddle.net/dsmgL9wj/17/(譯註圖表版本44)

0

解決方法是明確指定API的先前版本加載,而不是使用電流: google.charts.load( '當前', {'包':['annotationchart'] });

代替目前使用的43

google.charts.load('43', { 
     'packages': ['annotationchart'] 
     });