anirudhb029 / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Flot does not render correctly in IE8 standards mode #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Environment:
 - Vista x64 SP1 (+ latest patches)
 - IE8 RTM
 - flot 0.5

I can confirm that graph is rendered correctly in IE8 compatibility mode.

Original issue reported on code.google.com by arnold.zokas on 22 Mar 2009 at 5:32

Attachments:

GoogleCodeExporter commented 9 years ago
I think it's a problem with the old excanvas in 0.5. Would you mind trying SVN 
Flot
(and the version of excanvas bundled with it)?

Original comment by olau%iol...@gtempaccount.com on 23 Mar 2009 at 6:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I can confirm that the svn-version 148 of flot/excanvas works with IE8 in
standards-mode if the following code is added before plot-init, ref
http://code.google.com/p/explorercanvas/wiki/Instructions

var isIE = navigator.appName.indexOf("Microsoft") != -1;
var el = document.getElementById("chart");
if(isIE){
  G_vmlCanvasManager.initElement(el);//method only loaded for IE
  var ctx = el.getContext('2d');//dont know if this really is needed
}
var plot = $.plot(el, [d]);

Original comment by Oystein.Stromme@gmail.com on 24 Mar 2009 at 9:48

GoogleCodeExporter commented 9 years ago
Flot should already be doing this, if you look in the Flot code where it's
constructing the canvas.

Original comment by olau%iol...@gtempaccount.com on 24 Mar 2009 at 10:36

GoogleCodeExporter commented 9 years ago
i can just confirm that flot is not working on IE8 with excanvas r2, but worse, 
it 
is not working in any IE with excanvas r3.

Original comment by mmoos...@gmail.com on 24 Mar 2009 at 7:47

GoogleCodeExporter commented 9 years ago
Those are really, really old revisions? Note that SVN counts a revision up at 
all
commits, not just those related to a given file.

Why don't you grab the latest:

http://flot.googlecode.com/svn/trunk/excanvas.min.js

Original comment by olau%iol...@gtempaccount.com on 31 Mar 2009 at 7:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I tested flot-r148 with excanvas-r135, they are not working on IE8.

Original comment by cha...@gmail.com on 6 Apr 2009 at 4:48

GoogleCodeExporter commented 9 years ago
even with the latest excanvas in the svn trunk, no luck :
Détails de l’erreur de la page Web

Ligne : 1
Caractère : 1166
Code : 0
URI : http://alpha.empedocle.org/js/excanvas.js

Original comment by arnaud.d...@gmail.com on 14 Apr 2009 at 10:00

GoogleCodeExporter commented 9 years ago
Issue #133 seems to be related to this.

Original comment by olau%iol...@gtempaccount.com on 15 Apr 2009 at 5:38

GoogleCodeExporter commented 9 years ago
There's been progress on issue 133. If someone here would try the latest 
revision of
Flot with the latest revision of excanvas and report back whether it works.

http://flot.googlecode.com/svn/trunk/jquery.flot.js
http://flot.googlecode.com/svn/trunk/excanvas.min.js

I need to get myself a VM with IE8.

Original comment by olau%iol...@gtempaccount.com on 29 Apr 2009 at 8:44

GoogleCodeExporter commented 9 years ago
in IE am getting this error 
---------------------------------------------------------
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; 
SLCC1; 
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30618)
Timestamp: Fri, 1 May 2009 11:06:51 UTC

Message: 'window.G_vmlCanvasManager' is null or not an object
Line: 318
Char: 17
Code: 0
URI: http://localhost:8080/js/jquery.flot.js

---------------------------------------------------------

Original comment by Mark.d...@gmail.com on 1 May 2009 at 11:28

GoogleCodeExporter commented 9 years ago
I've tested with the latest revisions noted on comment 11 with IE8 on Vista 
with the
X-UA-Compatible: IE=8 header set on responses to trigger IE8 standards mode. I 
can
confirm it works successfully.

In case you're not aware Microsoft provide free Internet Explorer VM images for 
their
(free) Virtual PC product. You can grab them from
http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1
-73D0A413C8EF&displaylang=en

Original comment by si...@lieschke.net on 4 May 2009 at 3:24

GoogleCodeExporter commented 9 years ago
Thanks for the test!

As for the VM, thanks for the tip, unfortunately I'm mostly on Linux. But I 
think I
have one I can clone, I just to tidy up the hard drive a bit to make room for 
it.

Mark Dawn: are you sure you included Excanvas before Flot? That error means 
that Flot
tried to access the excanvas object that excanvas puts on window, but that it 
didn't
exist.

I think I can close this bug now. Thanks to all involved!

Original comment by olau%iol...@gtempaccount.com on 7 May 2009 at 5:37

GoogleCodeExporter commented 9 years ago
@Ole
You can try to install the virtual machine VirtualBox on your Linux and install 
a
Windows, you'll be able to test it on any IE using the Internet Explorer 
Collection.

Original comment by phenxdesign on 7 May 2009 at 5:42

GoogleCodeExporter commented 9 years ago
I'm running flot in IE8 on XP.  My graphs labels render but neither the axis, 
grid,
nor data renders.  Works in compatability mode only.

Original comment by sleigh...@gmail.com on 30 Jul 2009 at 11:49

GoogleCodeExporter commented 9 years ago
Incidentally, this is using float 0.5 with jQuery-1.3.2.js using the excanvas 
bundled
with flot 0.5.  Yes, excanvas is loaded before flot.

Original comment by sleigh...@gmail.com on 31 Jul 2009 at 12:37

GoogleCodeExporter commented 9 years ago
The version 0.5 is not compatible with IE8, whereas the code in the SVN trunk is
compatible.

Original comment by phenxdesign on 31 Jul 2009 at 8:14

GoogleCodeExporter commented 9 years ago
Just a quick note: I got Flot from SVN and html from an example and it didn't 
work in
IE8. The examples load "excanvas.pack.js" which is not in svn. Change that to
excanvas.min.js and it will be OK.

Original comment by total...@gmail.com on 7 Aug 2009 at 2:24

GoogleCodeExporter commented 9 years ago
I just fixed this problem on my IE8 adding this line of code:

<!--[if IE]><script language="javascript" type="text/javascript"
src="/library/flot/excanvas.js"></script><![endif]-->

I forgot to include the excanvas before, so I was getting that error. Now it's 
ok.

Original comment by redcatme...@gmail.com on 9 Apr 2010 at 1:56

GoogleCodeExporter commented 9 years ago
phenxdesign: thanks for the tip about Internet Explorer Collection. I'm already
running VirtualBox, works nicely.

Otherwise: yes, you need Flot 0.6 and need to remember to include excanvas.js, 
then
you should be fine.

Original comment by olau%iol...@gtempaccount.com on 14 Apr 2010 at 3:12

GoogleCodeExporter commented 9 years ago
My chart is not loading in IE. I'm using flot version 0.7 and excanvas.min.js 
that comes with flot. I've included the excanvas.min.js in the head before 
including flot.pie js. The strange thing is if i do an alert the chart works 
fine. If i take out the alert, it does not load the chart.

<script type="text/javascript">
   function loadChart() {
   alert("being called");
    var data = [
                    { label: "Series1",  data: 10},
                    { label: "Series2",  data: 30},
                    { label: "Series3",  data: 90},
                    { label: "Series4",  data: 70},
                    { label: "Series5",  data: 80},
                    { label: "Series6",  data: 110}
                ];

    // DEFAULT
    $.plot($("#quickvote-popup-results"), data, 
    {    series:{
           pie: { 
                show: true

            }
         }

    });
   } ;
$(document).ready(loadChart);
</script> 

Original comment by banugop...@gmail.com on 26 Sep 2011 at 6:54

GoogleCodeExporter commented 9 years ago
The issue on IE got fixed by calling it on $(window).load() instead of 
document.ready.

Original comment by banugop...@gmail.com on 26 Sep 2011 at 8:35

GoogleCodeExporter commented 9 years ago
My chart is not loading in IE8, it works fine with Firefox on the same machine.
I've added

<!--[if IE]><script type="text/javascript" 
src="/static/js/excanvas.min.js"></script><![endif]-->

But get the error

Message: 'data' is null or not an object
jquery.flot-0.7.js
Line: 310
Char: 17
Code: 0

I've also tried calling it with $(window).load() and $(document).ready()

Original comment by fca...@gmail.com on 21 Nov 2011 at 4:04

GoogleCodeExporter commented 9 years ago
The error shown above occurs because the needed files are not loaded. 
$(window).load() fixed the view. 

Original comment by sredi...@gmail.com on 21 Dec 2011 at 9:17

GoogleCodeExporter commented 9 years ago
I had the "Message: 'data' is null or not an object" error, because of an extra 
comma in my data array. Seems IE is a bit sensitive to JSON formatting.

Original comment by fdem...@gmail.com on 16 Jan 2012 at 4:07

GoogleCodeExporter commented 9 years ago
Ref fdem comment.

I have spent hours trawling through google trying to pin down the issue with 
flot. bottom line....  It was an extra comma that I hadn't rtrim correctly.....

Most reading this will no doubt have produced there own graphs with jflot et al 
and, when checking on ie (my issue hit on ie8) - jquery flot ie8 Line 310 Char 
17 Error Data is not an object [for anyone searching the issue in the future].  
Firefox handles json with a little more cushioning than ie, by that i mean it 
lets you get it wrong but still renders (nice).  If yu are getting the erro 
[jquery flot ie8 Line 310 Char 17 Error Data is not an object] then it is most 
likely that the data that you are pumping out at data: is poorly formed.  

Add to this... make sure you render the excanvas before jquery (yes it helped 
me) and also consider older versions of jquery (pre 1.7.2) if the issue 
continues, it may be a conflict.  have fun and I hope that helps someone qho 
hit the same issue as me [ jquery flot internet explorer issue Line 310 Char 17 
Error Data is not an object ] there we go, that should be search rich enough 
now :)

Original comment by petersta...@gmail.com on 10 Apr 2012 at 12:11

GoogleCodeExporter commented 9 years ago
Try adding this

<!--[if lt IE 9]><script language="javascript" type="text/javascript" 
src="../js/excanvas.min.js"></script><![endif]-->

excanvas.min.js is the sample folder of jqplot

Original comment by fi...@imagine.com.jo on 11 Jun 2012 at 10:27

GoogleCodeExporter commented 9 years ago
fdem...@gmail.com - Thank you ! Removing the last comma did the trick.

Original comment by nhc...@gmail.com on 1 Aug 2012 at 5:41