Take the 2-minute tour ×

We are in the process of building dashboards for users where in they can see the trends/time series graphs of various activerecords; take a blogging site as an example. There are posts, each post has many comments and tags. There are 2 kinds of dashboards to be built.

a. trend graphs
b. time series graphs

trends graphs:

example, trending tags ( top 10, with # of posts), the ui looks like this

today [week] [month]

When the user click on week, the trend shows the weekly data and so on. And similarly, another trend graph is top 10 posts with highest # of comments

time series graphs:

for example, time vs # of posts, over a period of 24 hours, 1 week, 1 month etc.,

    20  |
10  |   |   10
|   |   |   |
t1  t2  t3  t4

a visual example

Secondary Requirement: The time series graphs cane be interactive and we may want show the actual data or additional series when a point is selected. Additional series: for example when the user selects point (t3,30) we want to show the tag name vs #count data.


I have looked at statistics gem and it is good for generating counts but not graph data.

Question Is there a gem(framework) to generate data for these graphs?. In our case, the graph data can be cached and refreshed every 15/30 minutes.

share|improve this question
I want this stuff too ... –  linjunhalida Nov 3 '11 at 0:58
maybe you/me can write one? –  linjunhalida Nov 3 '11 at 1:20
We used Solr(from rails) for generating both these data sets. It is super fast and we did not have to cache any graph data. Solr response times are <10 ms, for about 10,000 posts, 10 tags, 2 comments avg. –  so_mv Nov 3 '11 at 1:32
Basically, shouldn't be AR's job. what you want is a "data crunching" tool that can provide statistics actions (Map/Reduce maybe)? Statistics aren't AR's better side. –  Elad Meidar Jun 29 '12 at 23:40
add comment

1 Answer

Is there any reason why you need a gem? A place that I've worked used Highcharts in combination with Ruby/Rails and that worked. You could also use the Google Chart API. I'm not sure how much you want to build out what you're doing, but you can create tables in a sql database that track whatever you want to be tracking, and then just feed those to the charting tool

Also, here are several services with API's that offer this kind of graphing capability.

StatsMix, Metricly, myDials, KPI Dashboard, and more

share|improve this answer
add comment

Your Answer


