Allows flot to be used for graphs as well as flotr2. Based on view.graph.js in the ckan-updates branch.