Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQPlot in IE (Using rePlot or reDraw)

I'm using the jqplot plugin to display gauge on an site. This runs perfectly in FF/Safari/Chrome but have to use excanvas to run in IE8.

The problem is that the gauges are created dynamically, and so values are passed through and then the replot() function is needed to place the 'needle' in a position on the gauge. When I use the replot() or redraw() function in IE however, the axis are rendered but the actual gauge is displayed in the completely wrong place (I can only see the very top corner of the gauge inside the element).

I've read that forcing IE8 to emulate IE7 using

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 

can solve this issue, but it hasn't effected the output in any way for me.

If there's anything else I need to include just say.

like image 448
steven mcdowell Avatar asked Apr 01 '26 23:04

steven mcdowell


1 Answers

  1. Make sure you're on the latest version of jQuery (per here).

  2. Make sure that you're initializing your jPlot using the .Ready function (per here). $(document).ready(function() {

    $.jqplot(...init options...);

    });

  3. Make sure to include jquery.jqplot.css (per here)

  4. Disable the custom security setting in IE8 called "Binary and script behaviors" (per here)

Finally, it could be a bug. Try posting the issue here.

It sounds like jqPlot is pretty buggy at this point for IE8/9. You might try searching their site to see if they have some solutions.

like image 190
Richard Avatar answered Apr 11 '26 02:04

Richard