Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 77 lines (57 sloc) 2.096 kb
2e79b02 Ryan Davis oops
zenspider authored
1 drawr
8ae8e81 Aaron Patterson Updating readme
tenderlove authored
2 by Aaron Patterson
3 http://seattlerb.org/
2e79b02 Ryan Davis oops
zenspider authored
4
5 == DESCRIPTION:
6
8ae8e81 Aaron Patterson Updating readme
tenderlove authored
7 This is a ruby wrapper around Plotr with a similar API to Gruff. You can
8 create graphs with a similar interface to Gruff, but offload the rendering
9 to the browser!
2e79b02 Ryan Davis oops
zenspider authored
10
11 == FEATURES/PROBLEMS:
12
8ae8e81 Aaron Patterson Updating readme
tenderlove authored
13 * Needs more tests!
2e79b02 Ryan Davis oops
zenspider authored
14
15 == SYNOPSIS:
16
8ae8e81 Aaron Patterson Updating readme
tenderlove authored
17 An example in rails. Your controller:
18
19 class GraphController < ApplicationController
20 def index
21 @drawr = Drawr::Pie.new
22 @drawr.title = "Twan"
23 @drawr.data("One", [1])
24 @drawr.data('Two', [2])
25 @drawr.data('Three', [2])
26 @drawr.data('Four', [10])
27 @drawr.data('Five', [6])
28 end
29 end
30
31 Your view:
32
33 <html>
34 <head>
35 <%= javascript_include_tag 'prototype' %>
36 <%= javascript_include_tag 'excanvas' %>
37 <%= javascript_include_tag 'Plotr' %>
38 </head>
39 <body>
40 <%= @drawr %>
41 </body>
42 </html>
2e79b02 Ryan Davis oops
zenspider authored
43
44 == REQUIREMENTS:
45
8ae8e81 Aaron Patterson Updating readme
tenderlove authored
46 * Plotr[http://www.solutoire.com/plotr]
2e79b02 Ryan Davis oops
zenspider authored
47
48 == INSTALL:
49
8ae8e81 Aaron Patterson Updating readme
tenderlove authored
50 * sudo gem install drawr
51 * require drawr in your environment.rb
2e79b02 Ryan Davis oops
zenspider authored
52
53 == LICENSE:
54
55 (The MIT License)
56
8ae8e81 Aaron Patterson Updating readme
tenderlove authored
57 Copyright (c) 2007 Aaron Patterson
2e79b02 Ryan Davis oops
zenspider authored
58
59 Permission is hereby granted, free of charge, to any person obtaining
60 a copy of this software and associated documentation files (the
61 'Software'), to deal in the Software without restriction, including
62 without limitation the rights to use, copy, modify, merge, publish,
63 distribute, sublicense, and/or sell copies of the Software, and to
64 permit persons to whom the Software is furnished to do so, subject to
65 the following conditions:
66
67 The above copyright notice and this permission notice shall be
68 included in all copies or substantial portions of the Software.
69
70 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
71 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
72 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
73 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
74 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
75 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
76 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.