public
Rubygem
Description: Gruff graphing library for Ruby
Homepage: http://gruff.rubyforge.org
Clone URL: git://github.com/topfunky/gruff.git
Search Repo:
Removed artwork from this branch.
topfunky (author)
Thu Mar 13 09:45:13 -0700 2008
commit  defc9aa87b67bc2527e21d9defce513b46a270d2
tree    8b50511de2994f692f78d1dc718c3458daed8fad
parent  dd5cf3b4937ab0aedb9152fda2c7c6133f525f42
...
1
2
...
 
0
0
@@ -1 +0,0 @@
0
-????????
0
\ No newline at end of file
...
1
2
...
 
0
0
@@ -1 +0,0 @@
0
-????????
0
\ No newline at end of file
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,36 +0,0 @@
0
-
0
-# Handles requests for gruff graphs.
0
-#
0
-# You shouldn't need to edit or extend this, but you can read
0
-# the documentation for GruffHelper to see how to call it from
0
-# another view.
0
-#
0
-# AUTHOR
0
-# Carlos Villela [mailto:cv@lixo.org]
0
-# Geoffrey Grosenbach[mailto:boss@topfunky.com]
0
-#
0
-# http://lixo.org
0
-# http://topfunky.com
0
-#
0
-require_gem 'gruff'
0
-
0
-class GruffController < ApplicationController
0
- layout nil
0
-
0
- def index
0
- opts = @session['gruff_opts']
0
- data = @session['gruff_data']
0
-
0
- raise "No Gruff data or options set in the session" if data.nil? or opts.nil?
0
-
0
- g = Gruff::Line.new(475)
0
- g.title = opts[:title]
0
- g.labels = opts[:labels]
0
- g.theme_37signals
0
-
0
- data.each_pair {|k,v| g.data(k, v) }
0
-
0
- send_data(g.to_blob, :disposition => 'inline', :type => 'image/png', :filename => "gruff.png")
0
- end
0
-
0
-end
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,32 +0,0 @@
0
-
0
-# Provides a tag for embedding gruff graphs into your Rails app.
0
-#
0
-# To use, load it in your controller with
0
-#
0
-# helper :gruff
0
-#
0
-# AUTHOR
0
-#
0
-# Carlos Villela [mailto:cv@lixo.org]
0
-# Geoffrey Grosenbach[mailto:boss@topfunky.com]
0
-#
0
-# http://lixo.org
0
-# http://topfunky.com
0
-#
0
-# License
0
-#
0
-# This code is licensed under the MIT license.
0
-#
0
-module GruffsHelper
0
-
0
- # Call with a name-values hash and an options hash (title and labels supported for now).
0
- # You can also pass :class => 'some_css_class' ('gruff' by default).
0
- def gruff_tag(data={}, opts={})
0
-
0
- @session['gruff_opts']=opts
0
- @session['gruff_data']=data
0
-
0
- "<img src=\"/gruff\" class=\"#{opts[:class] || 'gruff'}\" alt=\"Gruff Graph\" />"
0
- end
0
-
0
-end
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,15 +0,0 @@
0
-#!/bin/sh
0
-
0
-# Install libraries for rmagick, using darwinports.
0
-#
0
-# Geoffrey Grosenbach boss@topfunky.com
0
-#
0
-
0
-sudo port install jpeg
0
-sudo port install libpng
0
-sudo port install libwmf
0
-sudo port install tiff
0
-sudo port install lcms
0
-sudo port install freetype
0
-sudo port install imagemagick
0
-sudo gem install rmagick
...
18
19
20
21
 
22
23
24
...
18
19
20
 
21
22
23
24
0
@@ -18,7 +18,7 @@ require File.dirname(__FILE__) + '/deprecated'
0
 module Gruff
0
 
0
   # This is the version of Gruff you are using.
0
- VERSION = '0.3.1'
0
+ VERSION = '0.3.2'
0
 
0
   class Base
0
 

Comments

    No one has commented yet.