Getting the flot-rails gem to play nicely with IE8

How to go about getting this Gem working nicely with IE8

Flot is a really useful graphing tool built on top of jQuery, and someone has very kindly created a rails gem called flot-rails which allows you to easily include the relevant JavaScript files in your rails project.

This article was written nearly 12 years ago last time I reviewed it, and we haven’t had to use Flot in nearly the same amont of time, that coupled with IE8 being less relevant now, I would double-check that this is actually the best way to fix any flot-rails issues. The gem hasn’t been updated in nearly as long.

An issue I found recently that was to allow flot to play nicely with IE8 you should have excanvas.js present, this gives canvas support to older versions of Internet Explorer (which is something that flot relies on).

What the README file of the rails-flot gem doesn’t explain well is that packaged up in the gem are all the JavaScript files you could need for flot, include excanvas.js

The fix then, if you are using rails-flot along with a need to support Internet Explorer 8 is to include the following in your manifest file;

//= require excanvas.js

Before you require anything relating to flot.

    Recent posts View all

    Rails

    Dealing with multiple languages with inflections

    How to have your site deal with multiple languages in inflections

    Threat Intelligence JavaScript

    Threat Intelligence Issue 5

    Issue 5 of our Threat Intelligence information