echo '<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>' , PHP_EOL ,' <script type="text/javascript"> google.charts.load("current", {packages:["corechart"]}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ [\'Task\', \'Bots Caught\'], [\'Wait Script\', '.$waitscript.'], [\'Text Removal\', '.$textremoval.'], [\'Honeypot / Hidden Question\', '.$hidden.'], [\'Custom Question\', '.$customquestion.'], [\'SFS Blacklist\', '.$sfsspam.'], [\'BotScout Blacklist\', '.$bscheck.'], [\'FSpamlist Blacklist\', '.$fscheck.'] ]);
var options = { title: \'Honeypot Blocker Results PieChart\', is3D: true, backgroundColor: \''.$rowcolor2.'\', titleTextStyle: {color: \''.$fontcolor.'\', fontSize: \'32px\'}, legendTextStyle: {color: \''.$fontcolor.'\', fontSize: \'16px\'}, colors: [\'#00A209\', \'#486EFF\', \'#AB00BC\', \'#C30012\', \'#D08E00\', \'#00C3B4\', \'#77D100\'], };
var chart = new google.visualization.PieChart(document.getElementById(\'piechart_3d\')); chart.draw(data, options); } </script>' , PHP_EOL;
Working
Not working
--
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 google-visualization-api+unsub...@googlegroups.com.
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/e6a5a55b-5532-4a22-b268-267712029f5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Derek,It would help to see pointers to the actual web pages, so we could see what the PHP code generates. We can't really help otherwise. If you 'view source' on those pages, you might notice what has gone wrong.
--
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript"> google.charts.load("current", {packages:["corechart"]}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Task', 'Bots Caught'],
['Wait Script', 169], ['Text Removal', 18], ['Honeypot / Hidden Question', 0], ['Custom Question', 0], ['SFS Blacklist', 0], ['BotScout Blacklist', 0], ['FSpamlist Blacklist', 0]
]);
var options = { title: 'Honeypot Blocker Results PieChart', is3D: true,
backgroundColor: '#f8ce55', titleTextStyle: {color: '#000000', fontSize: '32px'}, legendTextStyle: {color: '#000000', fontSize: '16px'},
colors: ['#00A209', '#486EFF', '#AB00BC', '#C30012', '#D08E00', '#00C3B4', '#77D100'], };
var chart = new google.visualization.PieChart(document.getElementById('piechart_3d')); chart.draw(data, options); } </script>
<div id="piechart_3d" style="width: 700px; height: 500px;"></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 google-visualization-api+unsub...@googlegroups.com.
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/c91d2843-c9cb-417d-a092-e66d06edcbef%40googlegroups.com.
Your code appears to be working fine for me: https://jsfiddle.net/dlaliberte/459jx0jc/I am using Chrome on Linux for this. Is there a platform where it fails for you?The error "a is not a function" indicates there is a bug in our code, possibly, and if so, I'd like to know what caused it, but if it is caused by something else on your page that interferes with the Google Charts code, then where the bug is becomes debatable.
--
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 google-visualization-api+unsub...@googlegroups.com.
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/a80748ea-1ee5-4998-80eb-9c1999c81db3%40googlegroups.com.