简体   繁体   中英

Dygraphs doesn't draw the data line in IE8

I recently upgraded the Dygraphs library for a client's website, and it now doesn't render properly in IE8 (Yes, I know what you're thinking, but by client's clients love using IE and won't upgrade).

I have the following headers (obviously I haven't put the real domain on there for this post):

<!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>

There are no errors in the console / debug panel, and when I hover the mouse over where the line should be, the legend shows in the corner as it's supposed to, with the correct data. Also, the Axis labels and values show up fine.

What could be causing the data line on the graph not to show up?

There is a very specific recommendation for the "X-UA-Compatible" header at http://dygraphs.com/#ie . Give it a try:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM