I trying to use google chart tools integrate with views , everything work fine on modern browser except Internet explorer. Can anyone help me to solved this issue. The 1st image work fine on chrome. But on IE show the blank page like WSOD and try to view page source code I found some error on js, please see on the 2nd image and more.

Work Great on Chrome.
http://www.devzr.com/sites/default/files/field/image/chrome.jpg

But Not working on IE
http://www.devzr.com/sites/default/files/field/image/issue-ie.jpg
http://www.devzr.com/sites/default/files/field/image/issue-ie2.jpg

Ps. I tried to upload image on drupal.org manny times but I can not.

Comments

DeSci’s picture

Issue summary: View changes

insert-images

DeSci’s picture

Issue summary: View changes

edit image

DeSci’s picture

Issue summary: View changes

editing

iLLin’s picture

Open up google_charts_tools.js and change the first line under "attach: "

 attach: function(context, settings) {
      if (navigator.userAgent.toLowerCase().indexOf('msie') > 0) {
        $(document).ready(drawChart); // IE : Use a jQuery document ready
      } else {
        google.setOnLoadCallback(drawChart, true); // Not IE : Use the standard google code
      }
      // Callback that creates and populates a data table,
      // instantiates the chart, passes in the data and
      // draws it.
      function drawChart() {

Works for me this way and it fixes any AJAX loading you do with charts.

iLLin’s picture

Issue summary: View changes

image

bsarchive’s picture

This doesn't seem to work in Firefox. ?

elainerr’s picture

Issue summary: View changes

I am also having this problem. Google charts work just fine with drupal and firefox, but not drupal and IE. You indicated to google_charts_tools.js but that file is not separately attached, it is called, I believe. I work in php mode in drupal for these types of custom visualizations.

The head of my document looks like this:

google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Recycling', 'Percent'], ['Commingle', 15.0], ['Trash', 74.1], ['Cardboard', 3.5], ['Wood', 0.7], ['Metal', 0.6], ['Glass', 0.6], ['Drywall', 0.5], ['Organic', 4.9], ['Polystyrene', 0.2], ]); var options = { title: 'Recycling', slices: {0: {color: '#3366cc'}, /*commingled*/ 1:{color: '#FF0000'}, /*trash*/ 2:{color: '#cc9966'}, /*cardboard*/ 3:{color: '#996600'}, /*wood*/ 4:{color: '#909090'}, /*metal*/ 5:{color: '#66ccff'}, /*glass*/ 6:{color: '#FFCC99'}, /*drywall*/ 7:{color: '#00cc00'}, /*organics*/ 8:{color: '#00CCCC'}} /*plastics*/ }; var chart = new google.visualization.PieChart(document.getElementById('piechart')); chart.draw(data, options); }
iLLin’s picture

Have you tried what I suggested? PHP or not, its still a javascript issue.