TanTayBui / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Without excanvas, flot should gracefully degrade on IE < 9 #680

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Canvas element is available on IE 9 and above. On IE 8 and below one need to 
include "excanvas" to make flot work.

However there may be reasons that one does not want to include and use 
"excanvas".

In this case, flot fails with the error described in issue 116
"window.G_vmlCanvasManager is null or not an Object"

For fixing issue 408, flot tests for existence of the canvas feature. If canvas 
feature is missing, it uses "excanvas".

However, it does not test for existence of "excanvas" and the error message 
described above is thrown.

Original issue reported on code.google.com by umts...@googlemail.com on 21 Mar 2012 at 12:01

GoogleCodeExporter commented 9 years ago
Workaround:

Test existence of canvas before using flot:

 if (document.createElement('canvas').getContext) {
    // call $.plot()
 }

Original comment by umts...@googlemail.com on 22 Mar 2012 at 8:19

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 7 May 2012 at 5:42

GoogleCodeExporter commented 9 years ago
We should improve the canvas availability check to cover the excanvas 
fall-back.  If neither canvas nor excanvas are available, we should raise a 
nicer error informing the user that they must either include excanvas or accept 
the fact that their plots won't work on IE8 and earlier.

Original comment by dnsch...@gmail.com on 11 Jul 2012 at 4:01