The main problem is that your data has an incorrect number of values in a few rows. If you leave out the last value in an array, that is, at best, ambiguous. There might have been a change in browsers such that this last value is now ignored, whereas it used to assume it is undefined. You should use explicit undefined values instead, and then it works, which you can see here: https://jsfiddle.net/ygmy1tsw/
On Fri, Aug 26, 2016 at 10:14 AM, <[email protected]> wrote: > It was brought to my attention today that the charts I had set up have not > been working since 8/23. At this point I'm not sure if there is some > technical issue going on (though I haven't seen anyone else post about it) > or if there was a code change or something broken by an update. > > I did see a thread about changes to the loader library code and I tried to > implement that but it didn't help. > > Does anybody see an issue with my code? > > *Old Code:* > > <html> >> <head> >> <script type="text/javascript" src="https://www.google.com/jsapi"></script> >> >> <script type="text/javascript"> >> google.load("visualization", "1", {packages:["gauge"]}); >> google.setOnLoadCallback(drawChart); >> >> function drawChart() { var data = >> google.visualization.arrayToDataTable([ >> ['Label', 'Value'], ['Agrinomix',1443], >> ['CM25',], ['S3',1698], ['3B',], ['Long >> Rd',] ]); var options = { width: 611, height: >> 150, greenFrom: 1382, greenTo: 1625, redFrom: 800, >> redTo: 1137, yellowFrom:1137, yellowTo: 1382, >> yellowColor: '#FFF959', minorTicks: 5, min: >> 0, max: 1625 }; var chart = new >> google.visualization.Gauge(document.getElementById('chart_div')); >> chart.draw(data, options); } </script> >> </head> >> <body> <div id="chart_div" style="width: 611px; height: 150px;"></div> >> </body> >> </html> >> > > > *New Code:* > > <html> >> <head> >> <script type="text/javascript" src="https://www.gstatic.com/ >> charts/loader.js"></script> >> <script type="text/javascript"> >> google.charts.load('current', {packages: ['gauge']}); >> google.charts.setOnLoadCallback(drawChart); >> >> function drawChart() { var data = >> google.visualization.arrayToDataTable([ >> ['Label', 'Value'], ['Agrinomix',1443], >> ['CM25',], ['S3',1698], ['3B',], ['Long >> Rd',] ]); var options = { width: 611, height: >> 150, greenFrom: 1382, greenTo: 1625, redFrom: 800, >> redTo: 1137, yellowFrom:1137, yellowTo: 1382, >> yellowColor: '#FFF959', minorTicks: 5, min: >> 0, max: 1625 }; var chart = new >> google.visualization.Gauge(document.getElementById('chart_div')); >> chart.draw(data, options); } </script> >> </head> >> <body> <div id="chart_div" style="width: 611px; height: 150px;"></div> >> </body> >> </html> >> > -- > 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 google-visualization-api@ > googlegroups.com. > 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/6e77554d-ce6e-4dc9-bbc5- > 3383f765add6%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/6e77554d-ce6e-4dc9-bbc5-3383f765add6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 5CC, Cambridge MA -- 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/CAOtcSJPvnzv8WNA7TaYuyUrw1JLSLXUFDECWCDj6bEP5OhxEnQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
