sawa
sawa

Reputation: 168249

Graph library that outputs in html

What Ruby libraries, if any, are there that generate a graph (such as line-graph) and output in html format (possibly using JavaScript/jQuery)?

Upvotes: 0

Views: 132

Answers (1)

mccannf
mccannf

Reputation: 16659

Ruby is more suited to a backend engine (e.g. on Rails) providing data to a front-end JavaScript library which produces the graphs.

So Ruby would generate data in JSON format for example, which can then be easily read in by a variety of libraries to produce any type of graph (which you can also tailor using CSS if you wish).

See here for a comparison of a lot of them out there:

http://socialcompare.com/en/comparison/javascript-graphs-and-charts-libraries

My personal preference? D3.js which produces very nice SVG graphs.

Edit

You can also find ruby gems that provide tighter integration with a number of these charting libraries.

Upvotes: 1

Related Questions