Go To ( http://adf.ly/20PrE )-)-) [Rails] Charts. Client side? Server side?

3 views
Skip to first unread message

Leonardo Mateo

unread,
Dec 3, 2011, 6:14:59 PM12/3/11
to rubyonra...@googlegroups.com
Hi everyone,

I need to add some charts to a Rails 3.1 application.
I've used Gruff[1] in the past, and now, researching a bit, I found a
few options, the one I liked the most is Highcharts[2].
The thing is they're two different approaches. I think, server side
approach might be easier to maintain, but client side one might
provide a better user experience.
I'd like to hear some opinions and/or experiences if any of you can
share them with me.
I really don't know how much effort will be necessary to maintain a
client side approach and I'm trying to decide if it really worth it.

Any comment will be appreciated.

Thanks a lot in advance.

Cheers!


[1]http://nubyonrails.com/pages/gruff
[2]http://www.highcharts.com/

--
Leonardo Mateo.
There's no place like ~

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

--
Go to Master Mind Home Base Income Website :-

http://adf.ly/20PrE

http://adf.ly/20PrE

Unsubscribe All Group Post :- http://j.gs/624707/unsubscribe

http://q.gs/624707/unsubscribe

Subscribe All Group Post :- http://j.gs/624707/subscribe

http://q.gs/624707/subscribe

Join Now Today (Paid Income) :-

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/?id=624707

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

http://adf.ly/20PrE

Colin Law

unread,
Dec 4, 2011, 3:07:02 AM12/4/11
to rubyonra...@googlegroups.com
On 3 December 2011 23:14, Leonardo Mateo <leonar...@gmail.com> wrote:
> Hi everyone,
>
> I need to add some charts to a Rails 3.1 application.
> I've used Gruff[1] in the past, and now, researching a bit, I found a
> few options, the one I liked the most is Highcharts[2].
> The thing is they're two different approaches. I think, server side
> approach might be easier to maintain, but client side one might
> provide a better user experience.

I have used flot (client side) with good results.

> I'd like to hear some opinions and/or experiences if any of you can
> share them with me.
> I really don't know how much effort will be necessary to maintain a
> client side approach and I'm trying to decide if it really worth it.

I don't see why client side should be any more effort to maintain than
server side.

Colin

CavalryJim

unread,
Dec 4, 2011, 6:52:15 AM12/4/11
to Ruby on Rails: Talk

On Dec 4, 2:07 am, Colin Law <clan...@googlemail.com> wrote:


> On 3 December 2011 23:14, Leonardo Mateo <leonardoma...@gmail.com> wrote:
>
> > Hi everyone,
>
> > I need to add some charts to a Rails 3.1 application.
> > I've used Gruff[1] in the past, and now, researching a bit, I found a
> > few options, the one I liked the most is Highcharts[2].
> > The thing is they're two different approaches. I think, server side
> > approach might be easier to maintain, but client side one might
> > provide a better user experience.
>
> I have used flot (client side) with good results.

I have used the GChart gem in a recent project with great success. It
allows you to tap into the power and flexibility of Google charts.

Colin Law

unread,
Dec 4, 2011, 7:11:11 AM12/4/11
to rubyonra...@googlegroups.com
On 4 December 2011 11:52, CavalryJim <james.d...@gmail.com> wrote:
>
>
> On Dec 4, 2:07 am, Colin Law <clan...@googlemail.com> wrote:
>> On 3 December 2011 23:14, Leonardo Mateo <leonardoma...@gmail.com> wrote:
>>
>> > Hi everyone,
>>
>> > I need to add some charts to a Rails 3.1 application.
>> > I've used Gruff[1] in the past, and now, researching a bit, I found a
>> > few options, the one I liked the most is Highcharts[2].
>> > The thing is they're two different approaches. I think, server side
>> > approach might be easier to maintain, but client side one might
>> > provide a better user experience.
>>
>> I have used flot (client side) with good results.
>
> I have used the GChart gem in a recent project with great success. It
> allows you to tap into the power and flexibility of Google charts.

Power yes, flexibility no, you can only do what google charts
provides, and if they change their API (or close it down) you would
have to change your code (though they do say they guarantee three
years backwards compatibility, just enough to get it all up and
running and then forget how it is supposed to work). By using an open
source jscript library (or similar server side code) you know that it
will continue to work as intended as you have downloaded the code and
it is entirely under your control. There is no chance of the API
changing under your feet. Also, at least in theory, you can make it
do anything you like by extending the code.

I have just checked and it is 18 months since I developed the app
using flot. Half way through the three years guaranteed compatibility
if I had used google charts.

Philip Hallstrom

unread,
Dec 5, 2011, 12:44:42 PM12/5/11
to rubyonra...@googlegroups.com
> I need to add some charts to a Rails 3.1 application.
> I've used Gruff[1] in the past, and now, researching a bit, I found a
> few options, the one I liked the most is Highcharts[2].
> The thing is they're two different approaches. I think, server side
> approach might be easier to maintain, but client side one might
> provide a better user experience.
> I'd like to hear some opinions and/or experiences if any of you can
> share them with me.
> I really don't know how much effort will be necessary to maintain a
> client side approach and I'm trying to decide if it really worth it.
>
> Any comment will be appreciated.

It's been a long time since I did any charts, but the one issue I did run into when doing client side was a chart that had a couple of thousand data points (maybe more, I don't remember). What I do remember is that you noticed when the chart hd a lot of points simply due to the javascript (in the html) being that much bigger.

I ended up having to munge it on the server side and lump the points into "weekly" chunks...

Whether or not that's an issue for you is an entirely different matter.

Reply all
Reply to author
Forward
0 new messages