Skip to content
📊 The rgraph interactive chart/graph library with the Rails asset pipeline.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
spec
vendor/assets/javascripts
.gitignore
.rspec
.travis.yml
CODE_OF_CONDUCT.md
Gemfile
README.md
Rakefile
license.txt
rgraph-rails.gemspec

README.md

Logo

Build Status Gem Version

Use the rgraph chart/graph library with the Rails asset pipeline.

Installation

Include the gem in your application's Gemfile:

gem 'rgraph-rails', '~> 4.67'

And then execute:

$ bundle

Usage

In your application.js, include the core RGraph file

//= require RGraph.common.core

Just below that, include one or more graph types you'd like to use. For example:

//= require RGraph.hprogress.js

Then add a simple graph

// example.coffee

$(window).load ->
  hprogress = new RGraph.HProgress({
    id: 'cvs',
    min: 50,
    max: 100,
    value: 85
  }).draw()

And finally the canvas that will contain the graph

# example.html.haml

%canvas#cvs{:height => "100", :width => "600"}
  [No canvas support]

For detailed documentation concerning the types of graphs/charts and all other available options, please see the official docs.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install.

Versioning

rgraph itself doesn't use semantic versioning (and therefore neither does this gem; it keeps the same version as it's less confusing) - you can find out about breaking changes by release on the Backwards Compatibility section on the official site.

Issues

If your query concerns the library itself, see the official support forum. If it is about this gem in particular, raise an issue.

Contributing

Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

MIT

You can’t perform that action at this time.