I am currently using ngx-charts version 10.0.1 for ploting Treemap chart. My Angular version is 7.2.1. It is working as expected in Chrome but the labels are not shown in IE11. On page load, i'm seeing below errors in the IE console:
TypeError: Object doesn't support property or method 'forEach' (Note: I am writing forEach loop to process data from backend, I also tried converting it into normal for loop, but it didn't solve the problem.)
TypeError: Unable to set property 'pointer-events' of undefined or null reference.
Also the animations on hover and on click actions are very slow compared to Chrome. And I can see the label and value on tooltip.
Things I have tried till now :-
1) I saw few of the forums and installed classlist.js and included following links in Index.html
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js" charset="utf-8"></script>
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/classlist.js/classList.min.js"></script>
<script src="node_modules/zone.js/dist/zone.min.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
2) I also added the animations.js and installed it. 3) Tried reverting the ngx-charts to the version 8.1.0.
But none of the above techniques seem to solve the problem.
Below is the code I have in my Polyfills.ts file:
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'core-js/client/shim';
import "isomorphic-fetch";
import 'core-js/es6';
import 'core-js/es7/array';
import 'core-js/es7/reflect';
require('zone.js/dist/zone');
if (typeof SVGElement.prototype.contains == 'undefined') {
SVGElement.prototype.contains = HTMLDivElement.prototype.contains;
}
if (!Element.prototype.matches) {
Element.prototype.matches =
(<any>Element.prototype).msMatchesSelector ||
Element.prototype.webkitMatchesSelector;
}
import 'classlist.js';
import 'web-animations-js';
import 'zone.js/dist/zone';
(window as any).global = window;
if (!Object.entries) {
Object.entries = function (obj) {
var ownProps = Object.keys(obj),
i = ownProps.length,
resArray = new Array(i); // preallocate the Array
while (i--)
resArray[i] = [ownProps[i], obj[ownProps[i]]];
return resArray;
};
}