Jump to content
JChartFX Community
  • 0

Can not display chart in Internet Explorer 9


roberthow
 Share

Question

Hi,

my jChartFX version is 7.1.5044 (7.1.5021 also has this problem) and IE9 version is 9.0.8112.16421, error details is:

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

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Wed, 6 Nov 2013 01:22:25 UTC


Message: Unable to get value of the property 'call': object is null or undefined
Line: 496
Char: 395
Code: 0
URI: http://localhost:8080/JQMTest/js/jchartfx.coreVector.js

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

html code :

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jChartFX Test</title>

<link rel="stylesheet" type="text/css" href="styles/jchartfx.css" />
<script type="text/javascript" src="js/jchartfx.system.js"></script>
<script type="text/javascript" src="js/jchartfx.coreVector.js"></script>
<script type="text/javascript">
var chart1;
function loadChart()
{
chart1 = new cfx.Chart();
chart1.getData().setSeries(2);
chart1.getAxisY().setMin(500);
chart1.getAxisY().setMax(2000);
var series1 = chart1.getSeries().getItem(0);
var series2 = chart1.getSeries().getItem(1);
series1.setGallery(cfx.Gallery.Lines);
series2.setGallery(cfx.Gallery.Bar);
var divHolder = document.getElementById('ChartDiv');
chart1.create(divHolder);
}

</script>
</head>
<body onload="loadChart()">
<div id="ChartDiv" style="width:600px;height:400px;display:inline-block"></div>
</body>
</html>

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

these codes works correctly in FireFox and Opera,

does any one can help me?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

The problem is that IE9 defaults to "quirks" mode if your HTML page does not start with the following

<!DOCTYPE html>

As soon I add that to your page the chart appear in my tests, if you show the Developer Tools you will notice that without the directive IE9 is in "quirks mode" and when you add the directive is in "Standards mode". You can also change the mode from the developer tools.
 
AFAIK this is the same for IE10.
 
About the page not being pretty to look at. This is by design. We obfuscate and minify the code.
 
Regards,
 
JuanC 
Link to comment
Share on other sites

  • 0

thank you, JuanC

the problem has been solved.

In my full html code, it has the directive "<!DOCTYPE html>".

But before the directive, i add some comments like this:

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

<!-- some comments -->

<!DOCTYPE html>

<html>

.......

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

So when I saw your reply, I open the Developer Tools and found IE9 is in "quirks mode".

I tried to delete the comments before "<!DOCTYPE html>" , then I found IE9 is in "Standards mode" and the chart has been displayed in my IE9.

thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...