Thanks for this wonderful library!
Since the release of 2.3.0, I've been facing a JavaScript error that occurs for every chart I try to display on IE 7 & 8 (didn't try on 9; FF & Chrome are not concerned); this even occur on the HighChart home page with the 2 top demo charts and the basic http://jsfiddle.net/gh/get/jquery/1.7.2 ... ine-basic/ also raise the exception... 4 times: once for each serie) Version 2.2.5 was working fine, so I dug into the source code to track down the problem...
The exception is raised by the extend method (line #124 of .src.js) when called by css method (line #286) previously called by the return statement of the clip method (line #4519); attached are the VisualWebDevelopper debugging print screens.
Apparently "hard" setting the 'clip' value to 'inherit' causes IE to refuse merging the css style objects.
I found 2 possible solutions to this issue, which prevent us to migrate to 2.3.0:
* Removing the default {clip: 'inherit' } prevent he exception to rise, but i'm sure there is a good reason for setting the default value here!
* or; in the css function (l. #286), under the isIE clause (since this occurs only in IE), using the setAttribute method on the el.styles object rather than setting the value directly is accepted (by IE only; so keeping the extend method for other browsers); like this :
Code: Select all
function css(el, styles) {
if (isIE) {
if (styles && styles.opacity !== UNDEFINED) {
styles.filter = 'alpha(opacity=' + (styles.opacity * 100) + ')';
}
// loop on styles to set them with setAttribute method,
// IE does not allow direct setting of style attributes
if(styles) {
var s;
for (s in styles)
el.style.setAttribute(s, styles[s]);
}
}
else
extend(el.style, styles);
}
Thanks,
Rom