What is your preferred way to produce charts in a

2019-01-20 21:28发布

I'd like to add some pie, bar and scatter charts to my Ruby on Rails web application. I want want them to be atractive, easy to add and not introduce much overhead.

What charting solution would you recommend?
What are its drawbacks (requires Javascript, Flash, expensive, etc)?

30条回答
Summer. ? 凉城
2楼-- · 2019-01-20 21:46

It requires flash and isn't free (though inexpensive): amcharts.

I've used it successfully and like it. I evaluated a number of options a while back and chose it. At the time, however, Google Charts wasn't as mature as it seems to be now. I would consider that first if I were to re-evaluate now.

查看更多
放荡不羁爱自由
3楼-- · 2019-01-20 21:46

I've just found ZiYa produces some really sexy charts and is Rails specific.

The downsides are it uses Flash and if you don't want the sites to link to XML/SWF page it costs $50 per site.

[I've not decided on it yet, but wanted to throw it out there in case people want to vote it up]

查看更多
Deceive 欺骗
4楼-- · 2019-01-20 21:47

FWIW, I'm not a fan of using Google Charts when fit & finish is important. I find that the variables for sizing, in particular, are unpredictable - the chart does its own thing.

I haven't yet played with Gruff/Bluff/etc., but for a higher-profile project I won't use Google Charts.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-01-20 21:48

I have started using protovis to generate SVG charts with javascript. My basic approach in rails is to have a controller that returns the data to be charted as JSON, and scoop it up with a bit of javascript and protovis.

Only downside, is that full IE support (Since it is based on SVG) is currently unavailable straight out of the box... However, current patches go a fair way to providing IE support, details of which can be found here.

查看更多
Juvenile、少年°
6楼-- · 2019-01-20 21:48

HighChart - A charting library written in pure JavaScript

Gems like highchart-rails, lazy-high-chart makes the integration with rails easier

查看更多
男人必须洒脱
7楼-- · 2019-01-20 21:49

I 2nd the vote for flot. The latest version lets you do some animations and actions that I previously thought would only be possible via Flash. The documentation is fantastic. It simple to write by hand, but for simple cases it gets even easier with a Rails plugin called flotilla. You should check out the examples page for a better idea of what it's capable of. The zooming and hover capabilities are especially impressive.

查看更多
登录 后发表回答