I added this function before my  google.charts.load() line and it fixed it. 
Evidently it "rewrites" the object assign function in IE.

        if (typeof Object.assign !== 'function') {
            // Must be writable: true, enumerable: false, configurable: true
            Object.defineProperty(Object, "assign", {
                value: function assign(target, varArgs) { // .length of 
function is 2
                    'use strict';
                    if (target === null || target === undefined) {
                        throw new TypeError('Cannot convert undefined or 
null to object');
                    }

                    var to = Object(target);

                    for (var index = 1; index < arguments.length; index++) {
                        var nextSource = arguments[index];

                        if (nextSource !== null && nextSource !== 
undefined) {
                            for (var nextKey in nextSource) {
                                // Avoid bugs when hasOwnProperty is 
shadowed
                                if 
(Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
                                    to[nextKey] = nextSource[nextKey];
                                }
                            }
                        }
                    }
                    return to;
                },
                writable: true,
                configurable: true
            });
        }

On Thursday, July 9, 2020 at 10:06:52 AM UTC-4, Cliff wrote:
>
> My problem is what is talked about in the 'Object doesn't support 
> 'assign' property or method' post.   I did insert Object.assign polyfill; 
> as a line right in front of the google.charts.load( line.  But it did not 
> change anything.  The AnnotationCharts chart does not render.    Cliff    
>                                          
>
> On Thursday, July 9, 2020 at 9:27:34 AM UTC-4, Cliff wrote:
>>
>> Hello,
>>
>> I''m working on an application using AnnotationCharts that has been 
>> running very well for some time now in Chrome, Edge, Firefox, Internet 
>> Explorer, and Opera browsers.   Yesterday it worked as expected in all 
>> browsers.
>> Today, it no longer works in  the Internet Explorer, but still works 
>> correctly in the other 4 browsers.  It does not render at all in IE.   The 
>> intended chart area is blank.  I generate a program in my code, write it 
>> out, and execute
>> it in an iframe.  The code I'm writing out that works in the 4 browsers, 
>> but not IE follows.
>>
>>
>> <HTML>   
>>
>>                  <HEAD>                       
>>
>>                    <SCRIPT TYPE='text/javascript' SRC='
>> https://www.gstatic.com/charts/loader.js'></SCRIPT>
>>
>>                    
>>
>>                    <SCRIPT TYPE='text/javascript'>
>>
>>                      google.charts.load('current', 
>> {'packages':['annotationchart']});
>>
>>                      google.charts.setOnLoadCallback(drawChart);
>>
>>        
>>
>>                      function drawChart() {         
>>
>>                        var data = new google.visualization.DataTable();  
>>        
>>
>>                        data.addColumn('date', 'Date');
>>
>>                        data.addColumn('number', 'State');
>>
>>                        data.addColumn('string', 'title1');         
>>
>>                        data.addColumn('string', 'text1');
>>
>>                        data.addRows([                         [new 
>> Date(1997,0,1), 61.0, undefined, undefined],
>>                                                                         
>>  [new Date(1999,0,1), 67.1, undefined, undefined],
>>                                                                       
>>    [new Date(2001,0,1), 64.5, undefined, undefined],
>>                                                                       
>>    [new Date(2003,0,1), 67.5,'Funding Approved','The Universal Coverage Act 
>> funding is allocated.'],
>>                                                                       
>>    [new Date(2003,0,15), 67.5,'Insurance For All','The Universal Coverage 
>> Act of 2003 is proposed.'],
>>                                                                       
>>    [new Date(2003,2,15), 67.5,'Insurance Finally','The Universal Coverage 
>> Act of 2003 passes.'],
>>                                                                       
>>    [new Date(2004,1,1), 67.5,'Funding Begins','The Universal Coverage Act 
>> funding of 2003 begins with a bang.'],
>>                                                                       
>>    [new Date(2005,0,1), 69.2, undefined, undefined]                      
>> ]); 
>>   
>>
>>                        var chart = new 
>> google.visualization.AnnotationChart(document.getElementById('chart_div'));  
>>                    
>>
>>                        chart.draw(data, {displayAnnotations: true, 
>> displayZoomButtons: false, allValuesSuffix: "'%", fill: 40, thickness: 1, 
>> colors:['#809FFF'], displayRangeSelector: false});       
>>
>>                      }     
>>
>>                      </SCRIPT>   
>>
>>                    </HEAD>    
>>
>>                    <BODY>      
>>
>>                      
>>
>>                      <DIV ID='chart_div' 
>> STYLE='WIDTH:800px;HEIGHT:380px;POSITION:relative;LEFT:1.5%;OVERFLOW:HIDDEN;'>
>>
>>                        
>>
>>                      </DIV>
>>
>>    
>>
>>                    </BODY>
>>
>> </HTML>
>>
>>
>> Any help is appreciated.   Thanks,
>>
>> Cliff
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/bf27ebb0-1bab-4091-8a45-17a1171f8cb0o%40googlegroups.com.

Reply via email to