Google Chart Error: bL is not a function

I made a small page with 3 graphs using the Google APIs.

Everything worked perfectly. However, from one moment to another fell.

This message appears in the place diagram: bL is not a function

Can anyone explain to me why this is happening?

My example works :

<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>

This is how it worked.

enter image description here

From one moment to another it was like that.

enter image description here

+4
source share
3 answers

Thanks for the answer.

I changed it

<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>

and it works great for me.

Very strange, but the truth is that it worked.

+1
source

gauge, line column. , google.load("visualization", "1", {packages:["gauge"]});, google.load("visualization", "1", {packages:["corechart"]});.

, , . - , .

, google.load("visualization", "1", {packages:["corechart","gauge"]});, .

+4

, , .

EDIT: , google.load , . , , .

+2
source

All Articles