Questions tagged [gruff]

Gruff is a graphing/infographics library for Ruby that can be used as a standalone gem or as part of Rails.

Gruff is a graphing/infographics library for Ruby that can be used as a standalone gem or as part of Rails. It programmatically creates image files that can be re-used or dynamically generated.

31 questions
5
votes
2 answers

how to send a graph via email in Ruby without saving to disk?

I'm using Ruby script and the "mail" gem to send emails. Question - How could how to send a graph via email in Ruby without saving to disk? Is this possible? Which graphing tool would you recommend and would the "mail" gem support somehow…
Greg
  • 34,042
  • 79
  • 253
  • 454
3
votes
1 answer

SPARQL Parse Error: unexpected terminal

I've been using gruff to create and execute some simple SPARQL queries, but have run into some trouble. The following query works (prefixes have been left out): SELECT ?k WHERE { ?k rdf:type uw:pcservice . } However, when I introduce the COUNT…
user2035965
  • 59
  • 1
  • 1
  • 5
2
votes
2 answers

rmagick installation

I am facing some issues while installing Rmagick. There are 2 ways to install this: 1] using Ruby-Gem 2] bld the source I am facing issues in both, but I will like to be able to get the gem and install. I have updated the PKG_CONFIG_PATH as many…
codeObserver
  • 6,521
  • 16
  • 76
  • 121
2
votes
1 answer

Gruff in RoR works in the console, crashes the server

when I attempt to do this apparently common and simple graph generation in Ruby on Rails (Ruby 1.9.2, RoR 3.2.1): @g = Gruff::Line.new @g.title = "My Graph" @g.data("Apples", [1, 2, 3, 4, 4, 3]) @g.data("Oranges", [4, 8, 7, 9, 8,…
Tim Stephens
  • 107
  • 9
2
votes
0 answers

Dynamic Image Creation With Gruff and Ruby on Rails

So I am new to Ruby on Rails and I was wondering if there was a way to create a gruff image without saving it to the disk and have it embedded inside a view static page with other html code. Right now I am using: send_data(graph.to_blob, :filename…
2
votes
4 answers

Image rendering on browser or temporary images?

I'm trying to make a statistics page where it will show several data and charts. The charts need to be pictures so that the user can save it/drag-and-drop to his/her personal reports. I'm using Gruff Graphs for Ruby to produce the charts but I don't…
Muralha
  • 23
  • 4
2
votes
1 answer

how to combine two columns in sparql?

Hi I have the output of results like this : ?name ?o ?x ------------ ABCD xyz ghh PQR xyz hij how do I combine the columns ?o and ?x into one column called papers? I need the output to be like this : ?name ?papers -------------- ABCD (xyz, ghh,…
2
votes
1 answer

Gruff is not working well. What to do?

I`m facing a problem with Gruff and Rails. Examples on the site fail with: ZeroDivisionError: divided by 0 from /home/prikha/.rvm/gems/ruby-1.9.3-p194@rubymine/gems/gruff-0.3.6/lib/gruff/base.rb:1066:in `label' from…
prikha
  • 1,853
  • 1
  • 16
  • 26
1
vote
1 answer

how to install gruff, rmagic gem on ubuntu system?

After installing gruff gem in ubuntu while running some code I get the below error /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- RMagick (LoadError) from…
Aniruddhsinh
  • 2,099
  • 3
  • 15
  • 19
1
vote
1 answer

How can I generate images in real-time using Ruby on Rails and Gruff?

I draw bar graphs in my app using gruff. In one view, 'compare', I want to show one graph for every 'step' my 'project' has. I imagine it something like this: image_tag graph_step_path(step) I've created a 'graph' action in the step controller and…
MrB
  • 2,155
  • 7
  • 27
  • 33
1
vote
2 answers

I am trying to do a Pie charts in my ruby on rails app

I am using the gem gruff in window 7 with docker, but when I try to write the g.data I get this error: unable to read font `\Users\Raul del Rio\Desktop\grupo-43\Vera.ttf' @ error/annotate.c/RenderFreetype/1362 Extracted source (around line…
mrpepo877
  • 490
  • 6
  • 23
1
vote
0 answers

Gruff Pie chart - description/legend next to each pie slice

I have two questions. I'm using Gruff library to draw charts in Ruby on Rails project. Is it possible make description next to each pie slice, like on image below. Second question is about spacing between slices. Is it possible to make some space…
Przemek903
  • 61
  • 1
  • 3
1
vote
1 answer

Ruby 1.9 compatible plotting / graphic library?

I feel like I have a simple desire that no one can satisfy: I want to be able to graph a set of points, and I am using Ruby 1.9.2. I would like to use Gruff or Scruffy, since these seem to be the easiest to use. However, they both rely on rmagick,…
Paul Hoffer
  • 12,606
  • 6
  • 28
  • 37
1
vote
0 answers

Display Image from Controller Action Wicked_pdf

I need to show an image inside the layout of my pdf from url action non from path of an existent image. In others view (view.html.erb) this tag works perfect <%= image_tag(url_for({:controller => 'users', :action =>'gruff'})) %> but inside of layout…
StAx
  • 272
  • 1
  • 3
  • 16
1
vote
1 answer

Data in Gruff diagram from database

I was looking for some example how to extract data from database and use it in diagram created in Gruff, but failed. So I want to show in this diagram two things from data base: Course.application.size - which would count all applications to this…
Ricce
  • 69
  • 6
1
2 3