uPlot Ruby Gem
This gem is a rails engine to include uPlot in your rails application.
Installation
Add this line to your application's Gemfile:
gem 'uplot'
And then execute:
$ bundle
Or install it yourself as:
$ gem install uplot
Usage
To use uPlot in your rails asset pipeline, you'll need to do the following:
In app/assets/javascripts/application.js
add
//= require uPlot.iife.min
In app/assets/stylesheets/application.css
add
*= require uPlot.min
See the dummy rails app in the test directory for an example of this.
Waiting for the DOM
If using turbolinks:
document.addEventListener('turbolinks:load', function(){
// uPlot code here
}, false);
If not using turbolinks:
document.addEventListener("DOMContentLoaded", function() {
// uPlot code here
}, false);
License
The gem is available as open source under the terms of the MIT License.