First, the reason IE8 is not working is because you have an errant comma at 
the end of the array:

[...56605,] <-- this comma causes IE8 to bomb

Second, you need to quote the strings in the array.  Third, the array is 
not correct for using with the arrayToDataTable method.  Each row of data 
needs to be a sub-array inside the main array, like this:

[
     ['Dia','Sucesso','Erro'],
     ['01-2014',3025909,52644],
     ['09-2013',3653911,78671],
     ['10-2013',4561530,147099],
     ['11-2013',3602919,89064],
     ['12-2013',3467523,56605]
]

On Tuesday, January 28, 2014 4:42:31 PM UTC-5, Alex Felix wrote:
>
> Hi asgallant!
>
> This is what array_data has by the time I get the error:
>
> *array_data 
> [Dia,Sucesso,Erro,01-2014,3025909,52644,09-2013,3653911,78671,10-2013,4561530,147099,11-2013,3602919,89064,12-2013,3467523,56605,]*
>
> I already set the callback as you told me to do, but it remains the same.
>
> Thanks for your help!
>
> Regards,
>
>
> On Tue, Jan 28, 2014 at 7:28 PM, asgallant 
> <[email protected]<javascript:>
> > wrote:
>
>> What does array_data contain when that error is thrown?
>>
>> As an aside, using multiple calls to google.setOnLoadCallback is not 
>> supported.  You need to use one callback that then calls your other 
>> functions:
>>
>> google.setOnLoadCallback(function () {     
>>     drawChartSucessMonthTotal();
>>     drawChartSucessMonth();   
>>     drawChartSucessPercent(); 
>>     drawChartSucessPercentMonth();
>>     drawChart();
>>     drawChart2();
>> });
>>
>> On Tuesday, January 28, 2014 3:51:03 PM UTC-5, Alex Felix wrote:
>>>
>>> Hi Guys!
>>>
>>> I have this code below to draw charts. It works fine on IE10/11 Firefox 
>>> e Chrome.
>>>
>>>> var array_data=[['Dia', 'Sucesso', 'Erro']];
>>>>
>>>>  var teste=[];
>>>>
>>>>   
>>>>
>>>>        google.load("visualization", "1.0", {packages:["corechart"]});
>>>>
>>>>       google.setOnLoadCallback(drawChartSucess);     
>>>>
>>>>       google.setOnLoadCallback(drawChartSucessMonthTotal);
>>>>
>>>>       google.setOnLoadCallback(drawChartSucessMonth);   
>>>>
>>>>       google.setOnLoadCallback(drawChartSucessPercent); 
>>>>
>>>>       google.setOnLoadCallback(drawChartSucessPercentMonth);
>>>>
>>>>       google.setOnLoadCallback(drawChart);
>>>>
>>>>       google.setOnLoadCallback(drawChart2);
>>>>
>>>>
>>>>>      function drawChartSucess() {
>>>>
>>>>         var array_tmp3 = array_sucess.slice(Math.max(1,
>>>>> array_sucess.length-20),array_sucess.length);
>>>>
>>>>         array_data = array_data.concat(array_tmp3);
>>>>
>>>>
>>>>>         var options = {
>>>>
>>>>           title: 'Logins Portal AutoAtendimento - Sucesso Vs Erro - 
>>>>> Diario',
>>>>
>>>>           hAxis: {title: 'Dia', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           yAxis: {title: 'Acessos', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           bar:   {groupWidth:   '90%'},
>>>>
>>>>           colors:['#109618','#dc3912']
>>>>
>>>>         };
>>>>
>>>>
>>>>> var data = google.visualization.arrayToDataTable(array_data,options);
>>>>
>>>>   var chart = new google.visualization.ColumnChart(document.
>>>>> getElementById('chart_div_sucesso'));
>>>>
>>>>         chart.draw(data, options);
>>>>
>>>>       }
>>>>
>>>>
>>>>>     function drawChartSucessMonthTotal() {
>>>>
>>>>         var array_data=[['Dia', 'Sucesso', 'Erro']];
>>>>
>>>>         var array_tmp134 = array_sucess_month_total.
>>>>> slice(Math.max(1,array_sucess_month_total.length-12),array_
>>>>> sucess_month_total.length);
>>>>
>>>>         array_data = array_data.concat(array_tmp134);
>>>>
>>>>
>>>>>         var data = google.visualization.arrayToDataTable(array_data);
>>>>
>>>>
>>>>>         var options = {
>>>>
>>>>           title: 'Logins Portal AutoAtendimento - Sucesso Vs Erro - 
>>>>> Total - Mensal',
>>>>
>>>>           hAxis: {title: 'Mes', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           yAxis: {title: 'Acessos', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           bar:   {groupWidth:   '90%'},
>>>>
>>>>           colors:['#109618','#dc3912']
>>>>
>>>>         };
>>>>
>>>>
>>>>>         var chart = new google.visualization.ColumnChart(document.
>>>>> getElementById('chart_div_sucesso_month_total'));
>>>>
>>>>         chart.draw(data, options);
>>>>
>>>>       }
>>>>
>>>>
>>>>>
>>>>>
>>>>>      function drawChartSucessMonth() {
>>>>
>>>>         var array_data=[['Dia', 'Sucesso', 'Erro']];
>>>>
>>>>         var array_tmp14 = array_sucess_month.slice(Math.
>>>>> max(1,array_sucess_month.length-12),array_sucess_month.length);
>>>>
>>>>         array_data = array_data.concat(array_tmp14);
>>>>
>>>>
>>>>>         var data = google.visualization.arrayToDataTable(array_data);
>>>>
>>>>
>>>>>         var options = {
>>>>
>>>>           title: 'Logins Portal AutoAtendimento - Sucesso Vs Erro - 
>>>>> Media - Mensal',
>>>>
>>>>           hAxis: {title: 'Mes', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           yAxis: {title: 'Acessos', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           bar:   {groupWidth:   '90%'},
>>>>
>>>>           colors:['#109618','#dc3912']
>>>>
>>>>         };
>>>>
>>>>
>>>>>         var chart = new google.visualization.ColumnChart(document.
>>>>> getElementById('chart_div_sucesso_month'));
>>>>
>>>>         chart.draw(data, options);
>>>>
>>>>       }
>>>>
>>>>
>>>>>
>>>>>
>>>>>   function drawChartSucessPercent() {
>>>>
>>>>         var array_data=[['Dia', 'Sucesso', 'Erro']]; 
>>>>
>>>>         var array_tmp4 = array_sucess_percent.slice(
>>>>> Math.max(1,array_sucess_percent.length-20),array_
>>>>> sucess_percent.length);
>>>>
>>>>         array_data = array_data.concat(array_tmp4);
>>>>
>>>>
>>>>>         var data = google.visualization.arrayToDataTable(array_data);
>>>>
>>>>
>>>>>         var options = {
>>>>
>>>>           title: 'Logins Portal AutoAtendimento - Sucesso Vs Erro - 
>>>>> Percentagem - Diario',
>>>>
>>>>           hAxis: {title: 'Dia', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           yAxis: {title: 'Acessos', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           bar:   {groupWidth:   '90%'},
>>>>
>>>>           colors:['#109618','#dc3912']
>>>>
>>>>         };
>>>>
>>>>
>>>>>         var chart = new google.visualization.ColumnChart(document.
>>>>> getElementById('chart_div_sucesso_percent'));
>>>>
>>>>         chart.draw(data, options);
>>>>
>>>>       }
>>>>
>>>>
>>>>> function drawChartSucessPercentMonth() {
>>>>
>>>>         var array_data=[['Dia', 'Sucesso', 'Erro']];
>>>>
>>>>         var array_tmp47 = array_sucess_percent_month.
>>>>> slice(Math.max(1,array_sucess_percent_month.length-20),
>>>>> array_sucess_percent_month.length);
>>>>
>>>>         array_data = array_data.concat(array_tmp47);
>>>>
>>>>
>>>>>         var data = google.visualization.arrayToDataTable(array_data);
>>>>
>>>>
>>>>>         var options = {
>>>>
>>>>           title: 'Logins Portal AutoAtendimento - Sucesso Vs Erro - 
>>>>> Percentagem - Mensal',
>>>>
>>>>           hAxis: {title: 'Mes', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           yAxis: {title: 'Acessos', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           bar:   {groupWidth:   '90%'},
>>>>
>>>>           colors:['#109618','#dc3912']
>>>>
>>>>         };
>>>>
>>>>
>>>>>         var chart = new google.visualization.ColumnChart(document.
>>>>> getElementById('chart_div_sucesso_percent_month'));
>>>>
>>>>         chart.draw(data, options);
>>>>
>>>>       }
>>>>
>>>>
>>>>>
>>>>>
>>>>>
>>>>>       function drawChart() {
>>>>
>>>>         var array_data=[['Dia', 'Sucesso', 'Erro', 'Usuario Invalido', 
>>>>> 'Senha Errada', 'Usuario Bloqueado']];
>>>>
>>>>  var array_tmp = array.slice(Math.max(1,array.length-20),array.length);
>>>>
>>>>  array_data = array_data.concat(array_tmp);
>>>>
>>>>
>>>>>         var data = google.visualization.arrayToDataTable(array_data);
>>>>
>>>>
>>>>>         var options = {
>>>>
>>>>           title: 'Logins Portal AutoAtendimento - Todos os casos',
>>>>
>>>>           hAxis: {title: 'Dia', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           yAxis: {title: 'Acessos', titleTextStyle: {color: 'blue'}},
>>>>
>>>>   bar:   {groupWidth: '90%'},
>>>>
>>>>   colors:['#109618','#dc3912','#ff9900','#3366cc','#990099']
>>>>
>>>>         };
>>>>
>>>>
>>>>>         var chart = new google.visualization.ColumnChart(document.
>>>>> getElementById('chart_div'));
>>>>
>>>>         chart.draw(data, options);
>>>>
>>>>       }
>>>>
>>>>
>>>>>
>>>>>       function drawChart2() {
>>>>
>>>>  var array_data=[['Dia', 'Erro', 'Usuario Invalido', 'Senha Errada', 
>>>>> 'Usuario Bloqueado']];
>>>>
>>>>  var array_tmp2 = array_percent.slice(Math.max(
>>>>> 1,array_percent.length-20),array_percent.length);
>>>>
>>>>  array_data = array_data.concat(array_tmp2);
>>>>
>>>>
>>>>>         var data2 = google.visualization.arrayToDataTable(array_data);
>>>>
>>>>
>>>>>         var options = {
>>>>
>>>>           title: 'Tipos de Erros de Logins em Percentagem',
>>>>
>>>>           hAxis: {title: 'Dia', titleTextStyle: {color: 'blue'}},
>>>>
>>>>           yAxis: {title: 'Acessos', titleTextStyle: {color: 'blue'}},
>>>>
>>>>   bar:   {groupWidth: '90%'},
>>>>
>>>>   colors:['#dc3912','#ff9900','#3366cc','#990099']
>>>>
>>>>         };
>>>>
>>>>
>>>>>         var chart2 = new google.visualization.ColumnChart(document.
>>>>> getElementById('chart_div2'));
>>>>
>>>>         chart2.draw(data2, options);
>>>>
>>>>       }
>>>>
>>>>
>>> When the var data is declared, I get this error:
>>>
>>> SCRIPT5022: Invalid row type for row 19 Arquivo: 
>>> format+pt_BR,default+pt_BR,ui+pt_BR,corechart+pt_BR.I.js Linha: 173 
>>> Coluna: 455
>>>
>>> Do you guys have any idea of what should be done to fix my code?
>>> Any help will be appreciated. 
>>>
>>>
>>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Google Visualization API" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/google-visualization-api/QiJzV7RNH5o/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> To post to this group, send email to 
>> [email protected]<javascript:>
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Alexandro Felix
>
>  

-- 
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to