Reputation: 5410
I need to generate some charts and graphs in a Ruby on Rails 3 app.
I have searched around for a gem to help me out and I have found gchartrb, googlecharts and gruff, but the first two seem to be too old to support Rails 3 (last commit is around 2008) and gruff I read that it is not recommended because it depends on ImageMagick and RMagick. But this was also from the year 2007.
HighCharts also have nice looking charts, but I don't have much JavaScript skills
So what gem or what approach would be best to have some bar/line/pie charts in a rails app?
Upvotes: 5
Views: 3233
Reputation: 774
I've another own option - https://github.com/railsjazz/rails_charts
It's using Apache eCharts, so same powerful as Highcharts and have convinient helpers to generate charts in your RoR app.
Upvotes: 0
Reputation: 4382
Even if the question was already answered, I would like to suggest Morris for those that will pass here, even with "not much JavaScript skills" you could create nice charts. I also do not have much Javascript skills, but so far it is being easy. You have basically to create a JSON on the server side and set it to a @variable on your Controller. From your view you access this variable from a Javascript code passing it to the Morris calls.
Upvotes: 2
Reputation: 227
I started using Highcharts a few weeks ago and can tell you that you don't need that much Javascript knowledge (depending on your needs and the complexity of the data). Apart from that those charts look really nice, in my opinion.
There are good tutorials and examples available which can help you. There's also a railscast regarding this topic.
Upvotes: 0
Reputation: 3488
Google has a great library for drawing charts with HTML5 and JavaScript. It's called Google Chart Tools.
You can pick the chart type you want from their Chart Gallery and use it with JavaScript. Even if you don't have much JavaScript skills, the examples should help you to get the job done.
Upvotes: 4