Charts library for Ruby
I am looking for a quite specific tool for generating charts, within Ruby on Rails application. I have done a research and couldn't find a solution that suits me.
Maybe you've bumped upon it and could just point me to it with a link? :)
My requirements for a solution are:
- it has to feature basic chart types like Pie, Bar, Stacked Bar, Line.
- it has to have basic configuration of a chart like legend, axis description.
- it has to be able to generate and save chart into image file without actually rendering it in a browser
- being a Ruby library would be nice, but it is not obligatory
- not being Gruff Graphing Library, I am lo开发者_运维问答oking for something more up to date, with less issues.
If you are aware about something, please post a link - it'll take you just a few seconds.
I think, that it is what you're looking for.
http://highcharts.com/
https://github.com/loudpixel/highcharts-rails
I've made a number of useful charts with the Google Chart API. There are a few gems: googlecharts, gchartrb. I haven't used them but they look like a good first cut.
As to not displaying it you can just make the call and save the result. No need to render, just make the call, get the URL, and fetch the file.
The only one that has satisfied all these conditions:
- I have been able to make it works without need of install weird dependencies
- Not has an HTML context requirement (all JS libraries)
- Not depends on GCharts (net traffic dependency)
- Exports to static graphic format
is gerbilcharts
Chartkick!!!
It's super nice. =)
It's been a long time since I asked this question and I see new people coming and posting new answers, which his great. This small post of mine turned out to be a small compendium of available libraries.
I decided to add my two cents. Nowadays whenever I am dealing with charts I usually use Highcharts. Highcharts is a very pleasant library by itself, but additionally there is incredible gem highcharts_on_rails which facilitates creating charts using DSL written in Ruby.
If you found this question and you're looking for options, consider highcharts_on_rails
.
This might be able to do what you want: Gruff
You can use rchart for plotting various chart.
I am using openflashchart http://pullmonkey.com/projects/open_flash_chart2/
you can save generated json data in database and render when needed
精彩评论