Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dsgriffin/rgraph-rails
:bar_chart: The rgraph interactive chart/graph library with the Rails asset pipeline.
https://github.com/dsgriffin/rgraph-rails
chart rails-asset-pipeline rgraph ruby ruby-gem ruby-on-rails
Last synced: 2 days ago
JSON representation
:bar_chart: The rgraph interactive chart/graph library with the Rails asset pipeline.
- Host: GitHub
- URL: https://github.com/dsgriffin/rgraph-rails
- Owner: dsgriffin
- License: mit
- Created: 2015-11-25T12:04:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-03T18:37:21.000Z (10 months ago)
- Last Synced: 2024-09-26T03:26:36.520Z (8 days ago)
- Topics: chart, rails-asset-pipeline, rgraph, ruby, ruby-gem, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 2.55 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![Logo](http://dsgriffin.github.io/images/logos/rgraph-rails.png)
[![Gem Version](https://badge.fury.io/rb/rgraph-rails.svg)](https://badge.fury.io/rb/rgraph-rails)
![](https://img.shields.io/badge/rgraph-6.14-red.svg)Use the [rgraph](http://www.rgraph.net/) chart/graph library with the Rails asset pipeline.
## Installation
Include the gem in your application's Gemfile:
```ruby
gem 'rgraph-rails', '~> 6.14'
```And then execute:
```ruby
$ bundle
```## Usage
In your `application.js`, include the core RGraph file
```ruby
//= require RGraph.common.core
```Just below that, include one or more graph types you'd like to use. For example:
```ruby
//= require RGraph.hprogress.js
```Then add a simple graph
```coffeescript
// 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
```haml
# 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](http://www.rgraph.net/docs/charts-index.html).
## Run locally
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 the library so that it's less confusing) - you can find out about breaking changes by release on the [Backwards Compatibility section on the official site](http://www.rgraph.net/docs/backwards-compatibility.html).
## Issues
If your query concerns the library itself, see the [official support forum](http://www.rgraph.net/support). If it is about this gem in particular, [raise an issue](https://github.com/dsgriffin/rgraph-rails/issues).
## Contributing
Bug reports and pull requests are welcome. Contributors are expected to adhere to the [Contributor Covenant](https://github.com/dsgriffin/rgraph-rails/blob/master/CODE_OF_CONDUCT.md) code of conduct.
## License
MIT