Opened 10 years ago
Closed 9 years ago
#12691 closed defect (invalid)
Error Message IE9 and dojox.charting
Reported by: | Ruth Lang | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Charting | Version: | 1.6.0 |
Keywords: | charting | Cc: | [email protected]…, cjolif |
Blocked By: | Blocking: |
Description (last modified by )
There is an error message when using dojox.charting in our application with IE9 and IE10 Preview http://www.mappetizer.de/en/examples/world_energy/
click on one of the countries. You see the following error message:
Meldung: Für die Eigenschaft "marginLeft" kann kein Wert abgerufen werden: Das Objekt ist Null oder undefiniert Zeile: 14 Zeichen: 47781 Code: 0 URI: http://localhost/lokaledaten/world_energy/dojoroot/dojo/dojo.js
The error occurs with Dojo 1.6 and Dojo 1.6.1RC
Attachments (3)
Change History (12)
comment:1 follow-up: 2 Changed 10 years ago by
Component: | General → Charting |
---|---|
Description: | modified (diff) |
Owner: | set to Eugene Lazutkin |
Status: | new → assigned |
comment:2 Changed 9 years ago by
Replying to elazutkin:
I need a stack trace using "un-built" version of Dojo, in order to see what is going on.
I have attached a screenshot of the stack trace. Unfortunately it is not possible to test if the error is gone in 1.7 Beta 2 because this version is fully broken with IE9
comment:4 Changed 9 years ago by
Ruth, it is hard to debug your code as the dojo version is obfuscated, however from what I've seen when running in IE9 the divNode you are attaching the chart to is parentless. We don't support this. I don't know why you have parentless divNode on IE9 and not on other platforms but that looks like the origin of your problem. If you confirm this, this is not a charting bug but something you must fix in your application.
comment:5 Changed 9 years ago by
Cc: | cjolif added |
---|
comment:6 Changed 9 years ago by
Hi Christophe,
thanks for your work. Hard for me to remember what I have done there....
But the differences between IE and Firefox, Opera is, that IE doesn't allow me to implement my chart in a dijit-TitlePane?, which I create programmatically. That is what I actually want to do. So IE is a special case.
So what I actually want to do is programmatically create the div-Node where the chart is appended, this div-Node then is appended to the programmatically created dijit. TitlePane?-Node (with .setContent(node))
Will try a little bit today on it today..
Ruth
Changed 9 years ago by
Shows the error when implementing a chart in a TitlePane? (IE8)
comment:7 Changed 9 years ago by
In order to fasten investigations would it be possible for you to provide us with a running minimal example that shows the issue of charting inside TitlePane (in IE) so that we can investigate?
comment:8 Changed 9 years ago by
Hi Christophe, below the example. Works in Firefox, Opera, Safari, Google, but not IE (8 and 9)
http://www.uismedia.de/dojochart.html
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" type="text/javascript" djConfig="parseOnLoad: true"></script> <script type="text/javascript">
dojo.require("dojox.charting.Chart2D"); dojo.require("dijit.TitlePane?"); makeCharts = function() {
var parNode = document.createElement("div");
var tp = new dijit.TitlePane?({
title: "I am a TitlePane? with a chart in it"
});
var chart1 = new dojox.charting.Chart2D(parNode); chart1.addPlot("default", {
type: "Lines"
}); chart1.addAxis("x"); chart1.addAxis("y", {
vertical: true
}); chart1.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]); chart1.render();
tp.setContent(parNode); dojo.byId("holder").appendChild(tp.domNode);
};
dojo.addOnLoad(makeCharts);
</script>
<style type="text/css"> @import "http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/tundra/tundra.css"; </style>
</head> <body class="tundra" style="margin:0px;visibility:visible">
<div id="holder"> </div>
</body> </html>
Changed 9 years ago by
Attachment: | dojochart.html added |
---|
comment:9 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
One more time it looks like you are adding the chart to a node not yet attached to the !DOM. Change your code as follows and your chart in a TabPane? should work in IE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" type="text/javascript" djConfig="parseOnLoad: true"></script> <script type="text/javascript"> dojo.require("dojox.charting.Chart2D"); dojo.require("dijit.TitlePane"); makeCharts = function() { var parNode = document.createElement("div"); var tp = new dijit.TitlePane({ title: "I am a TitlePane with a chart in it" }); tp.setContent(parNode); dojo.byId("holder").appendChild(tp.domNode); var chart1 = new dojox.charting.Chart2D(parNode); chart1.addPlot("default", { type: "Lines" }); chart1.addAxis("x"); chart1.addAxis("y", { vertical: true }); chart1.addSeries("Series 1", [1, 2, 2, 3, 4, 5, 5, 7]); chart1.render(); }; dojo.addOnLoad(makeCharts); </script> <style type="text/css"> @import "http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/tundra/tundra.css"; </style> </head> <body class="tundra" style="margin:0px;visibility:visible"> <div id="holder"> </div> </body> </html>
I will close that bug as one more time we don't support adding to non attached DOM nodes.
Please re-open if you have additional information that contradicts this.
I need a stack trace using "un-built" version of Dojo, in order to see what is going on.