Issue #439 resolved

IE can't display a customized legend in Quirks mode

ipanema
created an issue

While in Quirks mode, Internet Explorer has difficulties to display a customized legend.

For example, if you try the kcp_cdf example with following code:

cursor: { show: true, showVerticalLine : true, showCursorLegend : true, cursorLegendFormatString : '<span style=\"float: left; width: 5em;\">%s</span>%3$s' },

Every thing is working fine, but as soon as you use the Quirks mode (by adding the following code at the top of your html file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

(and remove the 'lt' and the "9" from the IE 9 tag)

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

the legend is no longuer working under IE (but is still working in Chrome and Firefox). My investigation points me to the fact that a <div> is created for the legend in the jqplot.cursor.js file - line 1035:

// make a table. one line label per row. var elem = document.createElement('div');

, and <tr> and <td> tags are included into this <div>. If you replace this <div> tag by a <table> tag, the legend is working fine again (in all the modes and in all browsers).

I've attached the example file for your convenience.

Is there any reason why <tr> and <td> should be included in a <div> and not a <table>?

Thank you in advance,

Franck

Comments (3)

  1. Log in to comment