Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught ReferenceError: ufa is not defined using Google visualization API

I have encountered in which the visualization chart doesn't show due to this error:

Uncaught ReferenceError: ufa is not defined

This is the link where js called is located. Many thanks!

like image 675
Arbin Bulaybulay Avatar asked Aug 29 '26 02:08

Arbin Bulaybulay


1 Answers

Make sure that your webpage calls to jsapi and google.load() once. Qouted below details from Google Developer's Site

You may be using the Google Loader incorrectly.

Only load jsapi once. No matter how many charts you have on your web page, you should have one and only one call like this:

<script type="text/javascript" src="https://www.google.com/jsapi"></script> // Do this ONCE.

Ideally, call google.load only once, with all the packages you'll need for your web page.

Do the loading of multiple packages like below,

 <script>
       google.load("visualization", "1", {packages: ["corechart", "timeline"]});
 </script>
like image 90
Bob Avatar answered Sep 02 '26 04:09

Bob