New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highcharts v11.3 doesn't work properly on internet explorer 11 #21098
Comments
Hi @lucaferrero-ors! I'm sorry for not getting back to you sooner. Have you tried any other Highcharts version in between? I'm asking because I have no way to test it in IE11 and maybe we can pinpoint where the issue started. |
Thank you for the details @lucaferrero-ors . The dev tools are not working in Edge when running in ie mode but this can be resolved as explained here. The Highcharts Stock build for es5 is missing the polyfill entirely. Other things are failing due to different reasons that are noted below but in the end, there's a workaround in 3 steps:
<script>
// Start with the polyfill so
if (!Array.prototype.includes) {
// eslint-disable-next-line no-extend-native
Array.prototype.includes = function (searchElement, fromIndex) {
return this.indexOf(searchElement, fromIndex) > -1;
};
}
if (!Array.prototype.find) {
// eslint-disable-next-line no-extend-native
Array.prototype.find = function (predicate, thisArg) {
for (var i = 0; i < this.length; i++) {
if (predicate.call(thisArg, this[i], i, this)) {
return this[i];
}
}
};
}
if (!Object.entries) {
Object.entries = function (obj) {
var keys = Object.keys(obj), iEnd = keys.length, entries = [];
for (var i = 0; i < iEnd; ++i) {
entries.push([keys[i], obj[keys[i]]]);
}
return entries;
};
}
if (!Object.values) {
Object.values = function (obj) {
var keys = Object.keys(obj), iEnd = keys.length, values = [];
for (var i = 0; i < iEnd; ++i) {
values.push(obj[keys[i]]);
}
return values;
};
}
// Add another polyfil
(function () {
if (typeof window.CustomEvent === "function") return false;
function CustomEvent(event, params) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
})();
// Extend Pointer so it doesn't crash in IE on composition
window.addEventListener('HighchartsModuleLoaded', function(e) {
if (e.detail.path === 'Core/Pointer.js') {
e.detail.module.dissolve = function() {
// A proper dissolve would be nice to have
};
}
});
</script>
<script language="javascript" type="text/javascript" src="https://code.highcharts.com/es5/highcharts.src.js"></script>
<script language="javascript" type="text/javascript" src="https://code.highcharts.com/es5/modules/stock.src.js"></script>
// Add another override
Highcharts.Pointer.prototype.inClass = function (element, className) {
var elem = element, elemClassName;
while (elem) {
elemClassName = Highcharts.attr(elem, 'class');
if (elemClassName) {
if (elemClassName.indexOf(className) !== -1) {
return true;
}
if (elemClassName.indexOf('highcharts-container') !== -1) {
return false;
}
}
// elem = elem.parentElement; // Old code
// Changed
elem = elem.parentNode;
if (
elem === document.documentElement ||
elem === window.document
) {
elem = null;
}
// End of change
}
}; Internal notes:
|
Thanks for the feedback; applying this workaround the click event works for all our charts. There is still a problem with the tooltip: it's not displayed. One more question: are you planning to release a version with these fixes in the future? Thanks in advance. |
@lucaferrero-ors IE11 does not support SVG element: feDropShadow so the tooltip that uses that filter (to add a shadow) by default is not visible at all. This can be disabled using the tooltip's shadow option or you could switch to a full HTML tooltip with tooltip options like: tooltip: {
enabled: true,
backgroundColor: null,
borderWidth: 0,
shadow: false,
useHTML: true,
style: {
padding: 0
}
}, With additional CSS required like: .highcharts-tooltip > span {
background: rgba(255, 255, 255, 0.85);
border: 1px solid silver;
border-radius: 3px;
box-shadow: 1px 1px 2px #888;
padding: 8px;
} (the style is copied from the
Yes, the issue is still open. I'll try to bump up the priority for this problem. |
thank you so much, we tryed the workaround and now the tooltip works too; we tryed both Internet explorer 11 and Edge in Internet explorer mode and the result shown was the same. Do you have an idea of when you might release the version with the fix? Thanks. |
At this very moment, there is no official next version release date. It can be expected within the next few weeks, but there is no proper fix implemented yet. After someone is assigned to this issue and it is closed then the very next release will have the fix. |
We recently updated our application from highcharts v7 to the v11.3; since we need to be compatible with internet explorer 11, we load the library (highstock) from the es5 folder as shown here https://www.highcharts.com/docs/getting-started/system-requirements.
All the charts are drawn but we encountered the following problems:
Unfortunately I haven't found a fiddle that works with ie11 or edge in internet explorer mode.
Here there is an example you can try on internet explorer:
The text was updated successfully, but these errors were encountered: