Multiple google charts issue in IE9 - error 'Microsoft JScript runtime error: 'gvjs_lK' is undefined'

35 views
Skip to first unread message

Steve Dyson

unread,
Oct 13, 2016, 8:40:48 AM10/13/16
to Google Visualization API
Google multiple charts on the same page don't work in IE9. Works fine in FireFox.

I get error 'Microsoft JScript runtime error: 'gvjs_lK' is undefined'

Here is the example and code snippet. It is the same example given on google chart website.

https://developers.google.com/chart/interactive/docs/basic_multiple_charts

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

          // Load Charts and the corechart package.
          google.charts.load('current', {'packages':['corechart']});

          // Draw the pie chart for Sarah's pizza when Charts is loaded.
          google.charts.setOnLoadCallback(drawSarahChart);

          // Draw the pie chart for the Anthony's pizza when Charts is loaded.
          google.charts.setOnLoadCallback(drawAnthonyChart);

          // Callback that draws the pie chart for Sarah's pizza.
          function drawSarahChart() {

            // Create the data table for Sarah's pizza.
            var data = new google.visualization.DataTable();
            data.addColumn('string', 'Topping');
            data.addColumn('number', 'Slices');
            data.addRows([
              ['Mushrooms', 1],
              ['Onions', 1],
              ['Olives', 2],
              ['Zucchini', 2],
              ['Pepperoni', 1]
            ]);

            // Set options for Sarah's pie chart.
            var options = {title:'How Much Pizza Sarah Ate Last Night',
                           width:400,
                           height:300};

            // Instantiate and draw the chart for Sarah's pizza.
            var chart = new google.visualization.PieChart(document.getElementById('Sarah_chart_div'));
            chart.draw(data, options);
          }

          // Callback that draws the pie chart for Anthony's pizza.
          function drawAnthonyChart() {

            // Create the data table for Anthony's pizza.
            var data = new google.visualization.DataTable();
            data.addColumn('string', 'Topping');
            data.addColumn('number', 'Slices');
            data.addRows([
              ['Mushrooms', 2],
              ['Onions', 2],
              ['Olives', 2],
              ['Zucchini', 0],
              ['Pepperoni', 3]
            ]);

            // Set options for Anthony's pie chart.
            var options = {title:'How Much Pizza Anthony Ate Last Night',
                           width:400,
                           height:300};

            // Instantiate and draw the chart for Anthony's pizza.
            var chart = new google.visualization.PieChart(document.getElementById('Anthony_chart_div'));
            chart.draw(data, options);
          }

<!-- language: lang-html -->

    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
           <!--Table and divs that hold the pie charts-->
        <table class="columns">
          <tr>
            <td><div id="Sarah_chart_div" style="border: 1px solid #ccc"></div></td>
            <td><div id="Anthony_chart_div" style="border: 1px solid #ccc"></div></td>
          </tr>
        </table>
      

<!-- end snippet -->


Daniel LaLiberte

unread,
Oct 13, 2016, 9:57:46 AM10/13/16
to Google Visualization API
Thanks for your report Steve.

Unfortunately, I no longer have access to IE9 for testing.  I know it would be difficult, but if you can get any more clues about what is happening when the error occurs, we might be able to fix it without testing locally.  I would suspect the problem involves the use of some feature that IE9 does not support.

--
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/bcf3ac38-ed14-404c-9f53-3307311efc96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages