Problem displaying chart in safari

1,561 views
Skip to first unread message

Adonai Technologies

unread,
Oct 13, 2015, 5:24:21 AM10/13/15
to Google Visualization API
google charts are not working on safari browser. i have tried on other browsers and its working fine.

tried this code

<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Language', 'Speakers (in millions)'],
          ['Assamese', 13], ['Bengali', 83], ['Bodo', 1.4],
          ['Dogri', 2.3], ['Gujarati', 46], ['Hindi', 300],
          ['Kannada', 38], ['Kashmiri', 5.5], ['Konkani', 5],
          ['Maithili', 20], ['Malayalam', 33], ['Manipuri', 1.5],
          ['Marathi', 72], ['Nepali', 2.9], ['Oriya', 33],
          ['Punjabi', 29], ['Sanskrit', 0.01], ['Santhali', 6.5],
          ['Sindhi', 2.5], ['Tamil', 61], ['Telugu', 74], ['Urdu', 52]
        ]);

        var options = {
          title: 'Indian Language Use',
          legend: 'none',
          pieSliceText: 'label',
          slices: {  4: {offset: 0.2},
                    12: {offset: 0.3},
                    14: {offset: 0.4},
                    15: {offset: 0.5},
          },
        };

      var chart = new google.visualization.PieChart(document.getElementById('piechart'));
        chart.draw(data, options);

      }
    </script>
  </head>
  <body>
    <div id="piechart" style="width: 900px; height: 500px;"></div>
  </body>
</html>


Daniel LaLiberte

unread,
Oct 13, 2015, 8:47:06 AM10/13/15
to Google Visualization API
Your code works fine for me on Safari (version 8.0.8 on Mac), which I made a jsfiddle example from:  http://jsfiddle.net/dlaliberte/u2qzg56j/   There might have been some strange whitespace chars that I changed.  

--
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-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/03dd00d9-c81c-4c9d-bc69-49da3bf80eed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA

vitluh...@gmail.com

unread,
Mar 10, 2016, 9:42:21 PM3/10/16
to Google Visualization API
thanks !

Vào 19:47:06 UTC+7 Thứ Ba, ngày 13 tháng 10 năm 2015, Daniel LaLiberte đã viết:
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.



--
dlali...@Google.com   5CC, Cambridge MA
daniel.l...@GMail.com 9 Juniper Ridge Road, Acton MA
Reply all
Reply to author
Forward
0 new messages