Opened 9 years ago

Closed 8 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: R.Lang@…, cjolif
Blocked By: Blocking:

Description (last modified by Eugene Lazutkin)

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)

Unbenannt.PNG (133.5 KB) - added by Ruth Lang 8 years ago.
the stack trace
chart.png (154.3 KB) - added by Ruth Lang 8 years ago.
Shows the error when implementing a chart in a TitlePane? (IE8)
dojochart.html (1.3 KB) - added by Ruth Lang 8 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 9 years ago by Eugene Lazutkin

Component: GeneralCharting
Description: modified (diff)
Owner: set to Eugene Lazutkin
Status: newassigned

I need a stack trace using "un-built" version of Dojo, in order to see what is going on.

Changed 8 years ago by Ruth Lang

Attachment: Unbenannt.PNG added

the stack trace

comment:2 in reply to:  1 Changed 8 years ago by Ruth Lang

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:3 Changed 8 years ago by Ruth Lang

Just tested with Dojo 1.7 Beta 5 the problem still exists

comment:4 Changed 8 years ago by cjolif

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 8 years ago by cjolif

Cc: cjolif added

comment:6 Changed 8 years ago by Ruth Lang

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 8 years ago by Ruth Lang

Attachment: chart.png added

Shows the error when implementing a chart in a TitlePane? (IE8)

comment:7 Changed 8 years ago by cjolif

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?

Version 0, edited 8 years ago by cjolif (next)

comment:8 Changed 8 years ago by Ruth Lang

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 8 years ago by Ruth Lang

Attachment: dojochart.html added

comment:9 Changed 8 years ago by cjolif

Resolution: invalid
Status: assignedclosed

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.

Last edited 8 years ago by cjolif (previous) (diff)
Note: See TracTickets for help on using tickets.