How to Render jQuery Flot Charts through AngularJS
Thing is, I really want to use AngularJS for the project I’m working on right now. I don’t know of any Angular-native charting libraries (though that would be a killer addition to Angular UI). Now I’m faced with the added layer of wrapping a jQuery plugin inside of Angular functions. What?
If you’ve worked with Flot before in regular ol’ jQuery, then you’re probably familiar with the Flot API. If you’re new to Flot, then give the API a quick read. You can customize pretty much anything in your graph/chart with it.
Here’s some example DOM markup:
Then the AngularJS:
How to get this to work on IE8
Add id="ng-app" to the document’s root element in conjunction with ng-app attribute