Dygraphs不会在IE8中绘制数据行

时间:2012-11-20 16:03:53

标签: javascript html internet-explorer-8 excanvas dygraphs

我最近为客户的网站升级了Dygraphs库,现在它在IE8中无法正常呈现(是的,我知道你在考虑什么,但是客户是这样做的)客户喜欢使用IE并且不会升级。

我有以下标题(显然我还没有把这个帖子的真实域名放在那里):

<!DOCTYPE html> 
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title>Live Data</title>
<link rel="stylesheet" href="http://mydomain.com/css/main.css" type="text/css" />
<link rel="stylesheet" href="http://mydomain.com/css/smoothness/jquery-ui-1.8.5.custom.css" type="text/css" />
<!--[if IE]>
   <script type="text/javascript" src="http://mydomain.com/js/excanvas.js"></script>
<![endif]-->
<script type="text/javascript" src="http://mydomain.com/js/dygraph-combined.js></script>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type="text/javascript" src="http://mydomain.com/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://mydomain.com/js/jquery.jec-1.3.0.js"></script>
<script type="text/javascript" src="http://mydomain.com/js/jquery-ui-1.8.5.custom.min.js"></script>
<script type="text/javascript" src="http://mydomain.com/js/jquery.jeditable.mini.js"></script>
<script type="text/javascript" src="http://mydomain.com/includes/DataTables-1.7.4/media/js/jquery.dataTables.js"></script>

控制台/调试面板中没有错误,当我将鼠标悬停在该线所在的位置时,图例会在正确的数据中显示在角落中。此外,Axis标签和值显示正常。

什么原因可能导致图表上的数据线无法显示?

1 个答案:

答案 0 :(得分:1)

http://dygraphs.com/#ie对“X-UA兼容”标题有一个非常具体的建议。试一试:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> 
<!--[if IE]><script src="path/to/excanvas.js"></script><![endif]-->
相关问题