Thanks for the answer! Yes the code runs fine without the graphs and we never had problems since now, there was no update on the code. The changing for the array prototype was some tip on some forum for the use of charts with richfaces and jsf. If i remove that the browser gets stuck on the modal window, some code renders but the graphs don't if i change the prototype the red box with the "call ... undefined appears. Must something related with the refresh of the components in the richface modal and the new visualisation code, is there any way of using the old version?
thanks Quarta-feira, 28 de Agosto de 2013 20:29:55 UTC+1, asgallant escreveu: > > I made up a fiddle based on that code, and it runs fine when you comment > out the Array.prototype.reduce = undefined; line: > http://jsfiddle.net/asgallant/S4teP/. What was the purpose for changing > the array prototype? Does your page load if you disable the charts > entirely? > > On Wednesday, August 28, 2013 2:27:47 PM UTC-4, Ivan Rajão wrote: >> >> Hi, >> >> Someone reported problems in some page with google graphs in our website, >> i saw that a new release came up in and might be related :) >> >> This is the code, we are using richfaces, the fx drawAlarmsCounterChart >> is called when the modal opens, in the past it shows some pretty graphs now >> shows some red boxes with "call method 'call' of undefined" >> I removed the *Array.prototype.reduce = undefined; *no error but the >> browser stops responding. Help would be appreciated :) thanks for your time >> and support! >> >> >> Main page ; >> >> <script type="text/javascript" src=' >> https://www.google.com/jsapi?autoload={ >> "modules":[{"name":"visualization","version":"1","packages":["corechart","table"]}]}'></script> >> >> Modal : >> >> function drawAlarmsCounterChart() { >> Array.prototype.reduce = undefined; >> drawAlarmsChart(); >> drawAlarmsChart2(); >> } >> >> function drawAlarmsChart() { >> var data = google.visualization.arrayToDataTable([ >> ['Data', 'Open','Open > 24H','Ack no clear'], >> ['Now',1,1,0]]); >> var options = { >> title: 'Alarm counters', >> is3D:true, >> fontSize:10, >> }; >> var chart = new >> google.visualization.BarChart(document.getElementById('chart_alarmCounters')); >> chart.draw(data, options); >> } >> >> function drawAlarmsChart2() { >> var data2 = google.visualization.arrayToDataTable([ >> ['Value', 'Count'], >> ['Warning',1]]); >> var options2 = { >> title: 'Open Group by severity', >> is3D:true, >> fontSize:10, >> }; >> var chart2 = new >> google.visualization.PieChart(document.getElementById('chart_alarmCounters2')); >> chart2.draw(data2, options2); >> } >> >> -- 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.
