I'm trying to insert some google charts on a wordpress website and the only 
graphs that are not being ehxibited are those built using ChartWrapper. 
(Outside of wordpress it works just fine)

All graphs using DrawChart or GeoChart are working fine

.

The error thrown is:


*Uncaught TypeError: Cannot read property 'Y' of null*

*    at new gvjs_V (jsapi_compiled_i18n_default_module__pt_br.js:181)*

*    at Function.saldo_empregos_UF 
(?preview_id=3824&preview_nonce=08ccc7d927&_thumbnail_id=-1&preview=true:1072)*

*    at gvjs_Io.gvjs_.uC (jsapi_compiled_i18n_default_module__pt_br.js:175)*

*    at gvjs_Qo (jsapi_compiled_i18n_default_module__pt_br.js:167)*

*    at jsapi_compiled_i18n_default_module__pt_br.js:173*


Does someone have a hint on how to solve this?


My code:


<script type="text/javascript" 
src="https://www.gstatic.com/charts/loader.js";></script><script 
type="text/javascript">// <![CDATA[

google.charts.load('current', {'packages':['corechart', 'geochart','controls'], 
'language': 'pt-BR'});
google.charts.setOnLoadCallback(drawGID);

    function drawGID() {
        var consulta14 = encodeURIComponent("SELECT 'UF', 'Saldo' FROM 
1tW9OA8z2KOFNwwXkK4A2lV3SK7221QAfjdG2fGUZ");
        var query14 = new 
google.visualization.Query('http://www.google.com/fusiontables/gvizdata?rows:id=1&tq='
 + consulta14);
        query14.send(saldo_empregos_UF);
    }
function saldo_empregos_UF(response) {

        var tabela = response.getDataTable();
        var dados = new google.visualization.DataView(tabela);
        dados.setColumns([0,
        1,
        {
            calc: "stringify",
            sourceColumn: 1,
            type: "string",
            role: "annotation"
        }
        ]);

        var chart = new google.visualization.ChartWrapper({
            chartType: 'BarChart',
            containerId: 'chart_saldo_empregos_UF',
            dataTable: dados,
            options: {
                title: "Saldo de empregos gerados por MPE em Set/2017, por 
estado",
                height: 1100,
                legend: 'none'
            }
        });
        chart.draw();
    }
// ]]></script>
<div id="chart_saldo_empregos_UF"></div>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/e3eb088f-afd7-4b28-81e7-e1e9258beb5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to