• Resolved contactink

    (@contactink)


    Hi,
    this is a great plugin, and works perfectly with Firefox/Chrome, however I can’t get the chart option (chart=”Line”) working with IE11 or Edge.

    The plugin reads the connected googlesheets data fine, and it will display a table if I remove all chart options in the shortcode, but it will not display a chart in IE or Edge no matter what I do. I have tried disabling every other plugin, switched themes, tried on another website, read the FAQ, all the support messages, googled everything I can think of, checked the Google forums and testing different data types and formats in the googlesheet, but I’ve gotten nowhere. I don’t know if it’s a Plugin issue or Google Charts issue.

    Other googlechart plugins work in IE and Edge, but I really prefer the simplicity of this plugin. If I can get it to work and finish the job I will gladly pay the author for this plugin as it’s very handy.

    Has anyone else had any luck getting the chart option to work in IE or Edge? Or know any possible solutions to this?

    You can see the chart on this page:
    https://www.realminvestments.com.au/our-products/realm-strategic-income-fund-enduring-units/
    Browse down to the PERFORMANCE section near the bottom and click the “Enduring Units” tab. Works in all browsers and mobile, just not IE or Edge.

    Thanks for any help anyone can provide!

    V.

    • This topic was modified 4 years, 5 months ago by contactink. Reason: typo

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter contactink

    (@contactink)

    Update: think I’ve found the cause and fix. I have to Frankenfix it a bit and test some more, but it appears to fix the display of charts on IE/Edge so far. Seems to be due to the way the plugin loads the Google charts libraries which IE/Edge doesn’t like. Will update with details once tested as it may come in handy for someone else in similar situation.

    Thread Starter contactink

    (@contactink)

    UPDATE:
    Fix for google charts not displaying in IE11 and Edge v44 (not tested with latest Edge v83). This fix works across browsers and on mobiles.

    Open “igsv-gvizcharts.js”, (in /wp-content/plugins/inline-googlespreadsheet-viewer/) and change the following:

    
    google.load('visualization', '1.0', {
        'packages' : [
            'corechart',
            'annotatedtimeline',
            'annotationchart',
            'gauge',
            'geochart',
            'timeline'
        ]
    });
    

    to

    
    google.load('visualization', '47', {
        'packages' : [
            'corechart',
            'annotatedtimeline',
            'annotationchart',
            'gauge',
            'geochart',
            'timeline'
        ]
    });
    

    Best I can understand, Google Charts was updated in May, and made the following change:

    All ‘jsapi’ requests are now being redirected to the new loader. If you were loading version ‘1’ or ‘1.0’, you will now be loading ‘current’. The closest match to the last version that was previously available via the jsapi loader is ‘45.2’

    “Current” is loading v48, which is what breaks the charts, so setting it to frozen version “47” instead restores it to working again.

    Sorry if the above explanation is a bit confusing, it’s not my specialty. If the author @meitar isn’t maintaining this plugin anymore, this fix might help someone else.

    Wow thanks for letting us know your solution! Unfortunately it’s not working in my case.. Let’s hope Google is going to fix this. This Plugin doesn’t have an alternative.

    Thread Starter contactink

    (@contactink)

    Hi @kapitalfarm – sorry to hear it didn’t work for you!

    Here’s another alternative I found worked for me. Try this as well.
    And make sure you disable any caching plugins as well because I found caching stopped charts working properly on mobile, IE and sometimes Firefox as well.

    Replace:

    
    google.load('visualization', '1.0', {
        'packages' : [
            'corechart',
            'annotatedtimeline',
            'annotationchart',
            'gauge',
            'geochart',
            'timeline'
        ]
    });
    
    jQuery(document).ready(function () {
        jQuery('.igsv-chart').each(function () {
            var chart_id = jQuery(this).attr('id'),
                query = new google.visualization.Query(jQuery(this).data('datasource-href')),
                options = lowerFirstCharInKeys(stripPrefixInKeys('chart', jQuery(this).data()));
    

    with:

    google.charts.load('45.2', {packages: ['corechart']});
     
    google.setOnLoadCallback(function() {
    	jQuery('.igsv-chart').each(function () {
    		var chart_id = jQuery(this).attr('id'),
    			query = new google.visualization.Query(jQuery(this).data('datasource-href')),
    			options = lowerFirstCharInKeys(stripPrefixInKeys('chart', jQuery(this).data()));
    

    This also adds an additional change made by @niknas.

    You can also try different numbers instead of “45.2”.
    Here’s what I found:
    – using “current” instead of a number does not work – “current” is equivalent to automatically using the latest version from google, which is “48” at the moment. Something has changed in version 48 to break charts in IE/EDGE.
    – using – “47” – works.
    – using – “45.2” – works and is the version Google says is equivalent to using “1.0” in @meitar’s original plugin I think.
    – using – “43” – worked but broke menus on mobile browsers for me.

    Here’s some info from google about the above:
    https://developers.google.com/chart/interactive/docs/release_notes#Releases

    Hope you have some luck with this.

    • This reply was modified 4 years, 5 months ago by contactink.
    • This reply was modified 4 years, 5 months ago by contactink.
    • This reply was modified 4 years, 5 months ago by contactink.

    Hi @contactink,

    thank you so much! While the original code with Version 45.2 was not working, using “47” works for me aswell. Thanks again, you saved my day ??

    Thread Starter contactink

    (@contactink)

    Thanks @kapitalfarm! Glad I could help.

    Sean

    (@designicu_org)

    Thank you, this worked for me too. Great stuff.

    Thread Starter contactink

    (@contactink)

    That’s great @designicu_org

    Glad it helped.

    Vincent.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Chart option not working with IE11 or Edge browser?’ is closed to new replies.