googlecharts 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +1 -4
- data/History.txt +3 -0
- data/lib/gchart.rb +3 -1
- data/lib/gchart/aliases.rb +1 -0
- data/lib/gchart/version.rb +1 -1
- data/script/txt2html +3 -3
- data/website/index.html +231 -0
- data/website/index.txt +141 -11
- metadata +1 -1
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
@@ -1,4 +1 @@
|
|
1
|
-
|
2
|
-
��vtl5�>�@Y.��2Q`C��pT�_8I'ǒ��R�Lu��D������z-�e��(��B�|���c�&9�k��8&���i�
|
3
|
-
<3�x�a1�/�UA�D�3m�[�@\[Wm�?�1?�0)x?c LC�s��w�[!~_&n�YK4�?��Xs�dg��q�|>g�#kSU�"��^@3����U
|
4
|
-
���J�ի�{�Yb)�������3��%�$D�2��}h7�S
|
1
|
+
�u�|^�����,}MCn��1Ӕ��+�H/q�~���Уq�C�\K�1;a���/���.�C}r�����e�<��E���)� u���i��i�9y<*���{H�h���K�Ǧj r�s�6�#"K�LkY�B�1����@�K=Q�\�c�)yP��EO`N6�B j��˒E�\h��pT��m;_�d!!�Y�މU(w�o���r܂��Q��!jk��v&�l\�����8��"�X�D
|
data/History.txt
CHANGED
data/lib/gchart.rb
CHANGED
@@ -20,6 +20,8 @@ class Gchart
|
|
20
20
|
if @@types.include?(m.to_s)
|
21
21
|
chart = new(options.merge!({:type => m}))
|
22
22
|
chart.send(format)
|
23
|
+
elsif m.to_s == 'version'
|
24
|
+
Gchart::VERSION::STRING
|
23
25
|
else
|
24
26
|
"#{m} is not a supported chart format, please use one of the following: #{supported_types}."
|
25
27
|
end
|
@@ -308,7 +310,7 @@ class Gchart
|
|
308
310
|
when '@bg_color'
|
309
311
|
set_colors
|
310
312
|
when '@chart_color'
|
311
|
-
set_colors
|
313
|
+
set_colors if @bg_color.nil?
|
312
314
|
when '@data'
|
313
315
|
set_data unless @data == []
|
314
316
|
when '@bar_colors'
|
data/lib/gchart/aliases.rb
CHANGED
@@ -3,6 +3,7 @@ class Gchart
|
|
3
3
|
alias_method :background=, :bg=
|
4
4
|
alias_method :chart_bg=, :graph_bg=
|
5
5
|
alias_method :chart_color=, :graph_bg=
|
6
|
+
alias_method :chart_background=, :graph_bg=
|
6
7
|
alias_method :bar_color=, :bar_colors=
|
7
8
|
alias_method :line_colors=, :bar_colors=
|
8
9
|
alias_method :line_color=, :bar_colors=
|
data/lib/gchart/version.rb
CHANGED
data/script/txt2html
CHANGED
@@ -11,10 +11,10 @@ end
|
|
11
11
|
require 'redcloth'
|
12
12
|
require 'syntax/convertors/html'
|
13
13
|
require 'erb'
|
14
|
-
require File.dirname(__FILE__) + '/../lib/gchart
|
14
|
+
require File.dirname(__FILE__) + '/../lib/gchart'
|
15
15
|
|
16
|
-
version = Gchart
|
17
|
-
download = 'http://rubyforge.org/projects/
|
16
|
+
version = Gchart.version
|
17
|
+
download = 'http://rubyforge.org/projects/googlecharts'
|
18
18
|
|
19
19
|
class Fixnum
|
20
20
|
def ordinal
|
data/website/index.html
CHANGED
@@ -0,0 +1,231 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
+
<title>
|
8
|
+
Googlecharts
|
9
|
+
</title>
|
10
|
+
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
+
<style>
|
12
|
+
|
13
|
+
</style>
|
14
|
+
<script type="text/javascript">
|
15
|
+
window.onload = function() {
|
16
|
+
settings = {
|
17
|
+
tl: { radius: 10 },
|
18
|
+
tr: { radius: 10 },
|
19
|
+
bl: { radius: 10 },
|
20
|
+
br: { radius: 10 },
|
21
|
+
antiAlias: true,
|
22
|
+
autoPad: true,
|
23
|
+
validTags: ["div"]
|
24
|
+
}
|
25
|
+
var versionBox = new curvyCorners(settings, document.getElementById("version"));
|
26
|
+
versionBox.applyCornersToAll();
|
27
|
+
}
|
28
|
+
</script>
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="main">
|
32
|
+
|
33
|
+
<h1>Googlecharts</h1>
|
34
|
+
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/googlecharts"; return false'>
|
35
|
+
<p>Get Version</p>
|
36
|
+
<a href="http://rubyforge.org/projects/googlecharts" class="numbers">0.0.2</a>
|
37
|
+
</div>
|
38
|
+
<h2>→ ‘Sexy Charts using Google <span class="caps">API</span> & Ruby’</h2>
|
39
|
+
|
40
|
+
|
41
|
+
<h2>What</h2>
|
42
|
+
|
43
|
+
|
44
|
+
<pre><code>A nice and simple wrapper for <a href="http://code.google.com/apis/chart/">Google Chart API</a></code></pre>
|
45
|
+
|
46
|
+
|
47
|
+
<h2>Installing</h2>
|
48
|
+
|
49
|
+
|
50
|
+
<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">googlecharts</span></pre></p>
|
51
|
+
|
52
|
+
|
53
|
+
<h2>The basics</h2>
|
54
|
+
|
55
|
+
|
56
|
+
<p>This gem supports the following types of charts:</p>
|
57
|
+
|
58
|
+
|
59
|
+
<p><img src="http://chart.apis.google.com/chart?cht=lc&chs=200x125&chd=s:helloWorld&chxt=x,y&chxl=0:|Mar|Apr|May|June|July|1:||50+Kb" title="Line" alt="Line" /> Gchart.line()</p>
|
60
|
+
|
61
|
+
|
62
|
+
<p><img src="http://chart.apis.google.com/chart?cht=lxy&chs=200x125&chd=t:0,30,60,70,90,95,100|20,30,40,50,60,70,80|10,30,40,45,52|100,90,40,20,10|-1|5,33,50,55,7&chco=3072F3,ff0000,00aaaa&chls=2,4,1&chm=s,FF0000,0,-1,5|s,0000ff,1,-1,5|s,00aa00,2,-1,5" title="line_xy" alt="line_xy" /> Gchart.line_xy()</p>
|
63
|
+
|
64
|
+
|
65
|
+
<p><img src="http://chart.apis.google.com/chart?cht=s&chd=s:984sttvuvkQIBLKNCAIi,DEJPgq0uov17zwopQODS,AFLPTXaflptx159gsDrn&chxt=x,y&chxl=0:|0|2|3|4|5|6|7|8|9|10|1:|0|25|50|75|100&chs=200x125" title="scatter" alt="scatter" /> Gchart.scatter()</p>
|
66
|
+
|
67
|
+
|
68
|
+
<p><img src="http://chart.apis.google.com/chart?cht=bvg&chs=200x125&chd=s:hello,world&chco=cc0000,00aa00" title="bar" alt="bar" /> Gchart.bar()</p>
|
69
|
+
|
70
|
+
|
71
|
+
<p><img src="http://chart.apis.google.com/chart?cht=v&chs=200x100&chd=t:100,80,60,30,30,30,10" title="venn" alt="venn" /> Gchart.venn()</p>
|
72
|
+
|
73
|
+
|
74
|
+
<p><img src="http://chart.apis.google.com/chart?cht=p&chd=s:world5&chs=200x125&chl=A|B|C|D|E|Fe" title="pie" alt="pie" /> Gchart.pie()</p>
|
75
|
+
|
76
|
+
|
77
|
+
<p><img src="http://chart.apis.google.com/chart?cht=p3&chd=s:Uf9a&chs=200x100&chl=A|B|C|D" title="pie_3d" alt="pie_3d" /> Gchart.pie_3d()</p>
|
78
|
+
|
79
|
+
|
80
|
+
<h2>Demonstration of usage</h2>
|
81
|
+
|
82
|
+
|
83
|
+
install:
|
84
|
+
<code>sudo gem install googlecharts</code>
|
85
|
+
|
86
|
+
<p>require:
|
87
|
+
<pre class='syntax'><span class="ident">require</span> <span class="punct">'</span><span class="string">gchart</span><span class="punct">'</span></pre></p>
|
88
|
+
|
89
|
+
|
90
|
+
<p><pre class='syntax'><span class="constant">Gchart</span><span class="punct">.</span><span class="ident">line</span><span class="punct">(</span> <span class="symbol">:size</span> <span class="punct">=></span> <span class="punct">'</span><span class="string">200x300</span><span class="punct">',</span>
|
91
|
+
<span class="symbol">:title</span> <span class="punct">=></span> <span class="punct">"</span><span class="string">example title</span><span class="punct">",</span>
|
92
|
+
<span class="symbol">:bg</span> <span class="punct">=></span> <span class="punct">'</span><span class="string">efefef</span><span class="punct">',</span>
|
93
|
+
<span class="symbol">:legend</span> <span class="punct">=></span> <span class="punct">['</span><span class="string">first data set label</span><span class="punct">',</span> <span class="punct">'</span><span class="string">second data set label</span><span class="punct">'],</span>
|
94
|
+
<span class="symbol">:data</span> <span class="punct">=></span> <span class="punct">[</span><span class="number">10</span><span class="punct">,</span> <span class="number">30</span><span class="punct">,</span> <span class="number">120</span><span class="punct">,</span> <span class="number">45</span><span class="punct">,</span> <span class="number">72</span><span class="punct">])</span></pre></p>
|
95
|
+
|
96
|
+
|
97
|
+
<hr />
|
98
|
+
|
99
|
+
|
100
|
+
<strong>simple line chart</strong>
|
101
|
+
<pre syntax"ruby">
|
102
|
+
Gchart.line(:data => [0, 40, 10, 70, 20])
|
103
|
+
</pre>
|
104
|
+
|
105
|
+
<p>Generate the following url: http://chart.apis.google.com/chart?chs=300×200&chd=s:AiI9R&cht=lc</p>
|
106
|
+
|
107
|
+
|
108
|
+
<p>Inserted in an image tag, it will look like that:</p>
|
109
|
+
|
110
|
+
|
111
|
+
<p><img src="http://chart.apis.google.com/chart?chs=300x200&chd=s:AiI9R&cht=lc" title="simple line chart" alt="simple line chart" /></p>
|
112
|
+
|
113
|
+
|
114
|
+
<strong>multiple line charts</strong>
|
115
|
+
<pre syntax"ruby">
|
116
|
+
Gchart.line(:data => [[0, 40, 10, 70, 20],[41, 10, 80, 50]])
|
117
|
+
</pre>
|
118
|
+
|
119
|
+
<p><img src="http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:AeH1P,fH9m" title="multiple lines chart" alt="multiple lines chart" /></p>
|
120
|
+
|
121
|
+
|
122
|
+
<p><strong>set line colors</strong></p>
|
123
|
+
|
124
|
+
|
125
|
+
<pre syntax"ruby">
|
126
|
+
Gchart.line(:data => [[0, 40, 10, 70, 20],[41, 10, 80, 50]], :line_colors => "FF0000,00FF00")
|
127
|
+
</pre>
|
128
|
+
|
129
|
+
<p><img src="http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:AeH1P,fH9m&chco=FF0000,00FF00" title="line colors" alt="line colors" /></p>
|
130
|
+
|
131
|
+
|
132
|
+
<p><a href="http://code.google.com/apis/chart/#chart_colors">more info about color settings</a></p>
|
133
|
+
|
134
|
+
|
135
|
+
<p><strong>bar chart</strong></p>
|
136
|
+
|
137
|
+
|
138
|
+
<pre syntax"ruby">
|
139
|
+
Gchart.bar(:data => [300, 100, 30, 200])
|
140
|
+
</pre>
|
141
|
+
<img src="http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:9UGo" title="bars" alt="bars" />
|
142
|
+
|
143
|
+
<p><strong>Set the bar chart orientation</strong></p>
|
144
|
+
|
145
|
+
|
146
|
+
<pre syntax"ruby">
|
147
|
+
Gchart.bar(:data => [300, 100, 30, 200], :orientation => 'horizontal')
|
148
|
+
</pre>
|
149
|
+
<img src="http://chart.apis.google.com/chart?cht=bhs&chs=300x200&chd=s:9UGo" title="bars" alt="bars" />
|
150
|
+
|
151
|
+
<p><strong>pie chart</strong></p>
|
152
|
+
|
153
|
+
|
154
|
+
<pre syntax"ruby">
|
155
|
+
Gchart.pie(:data => [20, 35, 45])
|
156
|
+
</pre>
|
157
|
+
<img src="http://chart.apis.google.com/chart?cht=p&chs=300x200&chd=s:bv9" title="Pie Chart" alt="Pie Chart" />
|
158
|
+
|
159
|
+
<p><strong>venn diagram</strong></p>
|
160
|
+
|
161
|
+
|
162
|
+
<p><a href="http://code.google.com/apis/chart/#venn">Google documentation</a></p>
|
163
|
+
|
164
|
+
|
165
|
+
Data set:
|
166
|
+
<ul>
|
167
|
+
<li>the first three values specify the relative sizes of three circles, A, B, and C</li>
|
168
|
+
<li>the fourth value specifies the area of A intersecting B</li>
|
169
|
+
<li>the fifth value specifies the area of B intersecting C</li>
|
170
|
+
<li>the sixth value specifies the area of C intersecting A</li>
|
171
|
+
<li>the seventh value specifies the area of A intersecting B intersecting C</li>
|
172
|
+
</ul>
|
173
|
+
|
174
|
+
|
175
|
+
<pre syntax"ruby">
|
176
|
+
Gchart.venn(:data => [100, 80, 60, 30, 30, 30, 10])
|
177
|
+
</pre>
|
178
|
+
<img src="http://chart.apis.google.com/chart?cht=v&chs=300x200&chd=s:9wkSSSG" title="Venn" alt="Venn" />
|
179
|
+
|
180
|
+
<p><strong>scatter plot</strong></p>
|
181
|
+
|
182
|
+
|
183
|
+
<p><a href="http://code.google.com/apis/chart/#scatter_plot">Google Documentation</a></p>
|
184
|
+
|
185
|
+
|
186
|
+
<p>Supply two data sets, the first data set specifies x coordinates, the second set specifies y coordinates, the third set the data point size.</p>
|
187
|
+
|
188
|
+
|
189
|
+
<pre syntax"ruby">
|
190
|
+
Gchart.scatter(:data => [[1, 2, 3, 4, 5], [1, 2, 3, 4 ,5], [5, 4, 3, 2, 1]])
|
191
|
+
</pre>
|
192
|
+
|
193
|
+
<p><img src="http://chart.apis.google.com/chart?cht=s&chs=300x200&chd=s:MYkw9,MYkw9,9wkYM" title="scatter" alt="scatter" /></p>
|
194
|
+
|
195
|
+
|
196
|
+
<p><strong>set a title</strong></p>
|
197
|
+
|
198
|
+
|
199
|
+
<pre syntax"ruby">
|
200
|
+
Gchart.bar(:title => "Chart Sexyness in the last 5 days", :data => [15, 30, 10, 20, 100])
|
201
|
+
</pre>
|
202
|
+
|
203
|
+
<p><img src="http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:JSGM9&chtt=Chart+Sexyness+in+the+last+5+days" title="chart title" alt="chart title" /></p>
|
204
|
+
|
205
|
+
|
206
|
+
<h2>Repository</h2>
|
207
|
+
|
208
|
+
|
209
|
+
<p>The trunk repository is <code>svn://rubyforge.org/var/svn/Gchart/trunk</code> for anonymous access.</p>
|
210
|
+
|
211
|
+
|
212
|
+
<h2>License</h2>
|
213
|
+
|
214
|
+
|
215
|
+
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
216
|
+
|
217
|
+
|
218
|
+
<h2>Contact</h2>
|
219
|
+
|
220
|
+
|
221
|
+
<p>Comments are welcome. Send an email to <a href="mailto:mattaimonetti@gmail.com">Matt Aimonetti</a></p>
|
222
|
+
<p class="coda">
|
223
|
+
<a href="mattaimonetti@gmail.com">Matt Aimonetti</a>, 11th December 2007<br>
|
224
|
+
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
225
|
+
</p>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
<!-- insert site tracking codes here, like Google Urchin -->
|
229
|
+
|
230
|
+
</body>
|
231
|
+
</html>
|
data/website/index.txt
CHANGED
@@ -1,33 +1,163 @@
|
|
1
|
-
h1.
|
1
|
+
h1. Googlecharts
|
2
2
|
|
3
|
-
|
3
|
+
h2. → 'Sexy Charts using Google API & Ruby'
|
4
4
|
|
5
5
|
|
6
6
|
h2. What
|
7
|
-
|
7
|
+
|
8
|
+
A nice and simple wrapper for "Google Chart API":http://code.google.com/apis/chart/
|
8
9
|
|
9
10
|
h2. Installing
|
10
11
|
|
11
|
-
<pre syntax="ruby">sudo gem install
|
12
|
+
<pre syntax="ruby">sudo gem install googlecharts</pre>
|
12
13
|
|
13
14
|
h2. The basics
|
14
15
|
|
16
|
+
This gem supports the following types of charts:
|
17
|
+
|
18
|
+
!http://chart.apis.google.com/chart?cht=lc&chs=200x125&chd=s:helloWorld&chxt=x,y&chxl=0:|Mar|Apr|May|June|July|1:||50+Kb(Line)! Gchart.line()
|
19
|
+
|
20
|
+
!http://chart.apis.google.com/chart?cht=lxy&chs=200x125&chd=t:0,30,60,70,90,95,100|20,30,40,50,60,70,80|10,30,40,45,52|100,90,40,20,10|-1|5,33,50,55,7&chco=3072F3,ff0000,00aaaa&chls=2,4,1&chm=s,FF0000,0,-1,5|s,0000ff,1,-1,5|s,00aa00,2,-1,5(line_xy)! Gchart.line_xy()
|
21
|
+
|
22
|
+
!http://chart.apis.google.com/chart?cht=s&chd=s:984sttvuvkQIBLKNCAIi,DEJPgq0uov17zwopQODS,AFLPTXaflptx159gsDrn&chxt=x,y&chxl=0:|0|2|3|4|5|6|7|8|9|10|1:|0|25|50|75|100&chs=200x125(scatter)! Gchart.scatter()
|
23
|
+
|
24
|
+
!http://chart.apis.google.com/chart?cht=bvg&chs=200x125&chd=s:hello,world&chco=cc0000,00aa00(bar)! Gchart.bar()
|
25
|
+
|
26
|
+
!http://chart.apis.google.com/chart?cht=v&chs=200x100&chd=t:100,80,60,30,30,30,10(venn)! Gchart.venn()
|
27
|
+
|
28
|
+
!http://chart.apis.google.com/chart?cht=p&chd=s:world5&chs=200x125&chl=A|B|C|D|E|Fe(pie)! Gchart.pie()
|
29
|
+
|
30
|
+
!http://chart.apis.google.com/chart?cht=p3&chd=s:Uf9a&chs=200x100&chl=A|B|C|D(pie_3d)! Gchart.pie_3d()
|
31
|
+
|
15
32
|
|
16
33
|
h2. Demonstration of usage
|
17
34
|
|
35
|
+
install:
|
36
|
+
<code>sudo gem install googlecharts</code>
|
37
|
+
|
38
|
+
require:
|
39
|
+
<pre syntax="ruby">require 'gchart'</pre>
|
40
|
+
|
41
|
+
<pre syntax="ruby">Gchart.line( :size => '200x300',
|
42
|
+
:title => "example title",
|
43
|
+
:bg => 'efefef',
|
44
|
+
:legend => ['first data set label', 'second data set label'],
|
45
|
+
:data => [10, 30, 120, 45, 72])</pre>
|
46
|
+
|
47
|
+
---
|
48
|
+
|
49
|
+
*simple line chart*
|
50
|
+
<pre syntax"ruby">
|
51
|
+
Gchart.line(:data => [0, 40, 10, 70, 20])
|
52
|
+
</pre>
|
53
|
+
|
54
|
+
Generate the following url: http://chart.apis.google.com/chart?chs=300x200&chd=s:AiI9R&cht=lc
|
55
|
+
|
56
|
+
Inserted in an image tag, it will look like that:
|
57
|
+
|
58
|
+
!http://chart.apis.google.com/chart?chs=300x200&chd=s:AiI9R&cht=lc(simple line chart)!
|
59
|
+
|
60
|
+
*multiple line charts*
|
61
|
+
<pre syntax"ruby">
|
62
|
+
Gchart.line(:data => [[0, 40, 10, 70, 20],[41, 10, 80, 50]])
|
63
|
+
</pre>
|
64
|
+
|
65
|
+
!http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:AeH1P,fH9m(multiple lines chart)!
|
66
|
+
|
67
|
+
*set line colors*
|
68
|
+
|
69
|
+
<pre syntax"ruby">
|
70
|
+
Gchart.line(:data => [[0, 40, 10, 70, 20],[41, 10, 80, 50]], :line_colors => "FF0000,00FF00")
|
71
|
+
</pre>
|
72
|
+
|
73
|
+
!http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:AeH1P,fH9m&chco=FF0000,00FF00(line colors)!
|
74
|
+
|
75
|
+
"more info about color settings":http://code.google.com/apis/chart/#chart_colors
|
76
|
+
|
77
|
+
*bar chart*
|
78
|
+
|
79
|
+
<pre syntax"ruby">
|
80
|
+
Gchart.bar(:data => [300, 100, 30, 200])
|
81
|
+
</pre>
|
82
|
+
!http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:9UGo(bars)!
|
83
|
+
|
84
|
+
*Set the bar chart orientation*
|
85
|
+
|
86
|
+
<pre syntax"ruby">
|
87
|
+
Gchart.bar(:data => [300, 100, 30, 200], :orientation => 'horizontal')
|
88
|
+
</pre>
|
89
|
+
!http://chart.apis.google.com/chart?cht=bhs&chs=300x200&chd=s:9UGo(bars)!
|
90
|
+
|
91
|
+
|
92
|
+
*pie chart*
|
93
|
+
|
94
|
+
<pre syntax"ruby">
|
95
|
+
Gchart.pie(:data => [20, 35, 45])
|
96
|
+
</pre>
|
97
|
+
!http://chart.apis.google.com/chart?cht=p&chs=300x200&chd=s:bv9(Pie Chart)!
|
98
|
+
|
99
|
+
*venn diagram*
|
100
|
+
|
101
|
+
"Google documentation":http://code.google.com/apis/chart/#venn
|
102
|
+
|
103
|
+
Data set:
|
104
|
+
* the first three values specify the relative sizes of three circles, A, B, and C
|
105
|
+
* the fourth value specifies the area of A intersecting B
|
106
|
+
* the fifth value specifies the area of B intersecting C
|
107
|
+
* the sixth value specifies the area of C intersecting A
|
108
|
+
* the seventh value specifies the area of A intersecting B intersecting C
|
109
|
+
|
110
|
+
<pre syntax"ruby">
|
111
|
+
Gchart.venn(:data => [100, 80, 60, 30, 30, 30, 10])
|
112
|
+
</pre>
|
113
|
+
!http://chart.apis.google.com/chart?cht=v&chs=300x200&chd=s:9wkSSSG(Venn)!
|
114
|
+
|
115
|
+
*scatter plot*
|
116
|
+
|
117
|
+
"Google Documentation":http://code.google.com/apis/chart/#scatter_plot
|
118
|
+
|
119
|
+
Supply two data sets, the first data set specifies x coordinates, the second set specifies y coordinates, the third set the data point size.
|
120
|
+
|
121
|
+
<pre syntax"ruby">
|
122
|
+
Gchart.scatter(:data => [[1, 2, 3, 4, 5], [1, 2, 3, 4 ,5], [5, 4, 3, 2, 1]])
|
123
|
+
</pre>
|
124
|
+
|
125
|
+
!http://chart.apis.google.com/chart?cht=s&chs=300x200&chd=s:MYkw9,MYkw9,9wkYM(scatter)!
|
126
|
+
|
127
|
+
---
|
128
|
+
|
129
|
+
*set a chart title*
|
130
|
+
|
131
|
+
<pre syntax"ruby">
|
132
|
+
Gchart.bar(:title => "Recent Chart Sexyness", :data => [15, 30, 10, 20, 100, 20, 40, 100])
|
133
|
+
</pre>
|
134
|
+
|
135
|
+
!http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:JSGM9MY9&chtt=Recent+Chart+Sexyness(chart title)!
|
136
|
+
|
137
|
+
*set the image background color*
|
138
|
+
|
139
|
+
<pre syntax"ruby">
|
140
|
+
Gchart.bar( :title => "Matt's Mojo",
|
141
|
+
:data => [15, 30, 10, 20, 100, 20, 40, 100, 90, 100, 80],
|
142
|
+
:background => 'EEEEEE')
|
143
|
+
</pre>
|
18
144
|
|
145
|
+
!http://chart.apis.google.com/chart?chf=bg,s,EEEEEE&cht=bvs&chs=300x200&chd=s:JSGM9MY929w&chtt=Matt's+Mojo(Background)!
|
19
146
|
|
20
|
-
|
147
|
+
*set the chart background color*
|
21
148
|
|
22
|
-
"
|
149
|
+
<pre syntax"ruby">
|
150
|
+
Gchart.bar( :title => "Matt's Mojo",
|
151
|
+
:data => [15, 30, 10, 20, 100, 20, 40, 100, 90, 100, 80],
|
152
|
+
:background => 'EEEEEE', :chart_background => '000000')
|
153
|
+
</pre>
|
23
154
|
|
24
|
-
|
155
|
+
!http://chart.apis.google.com/chart?chf=c,s,000000|bg,s,EEEEEE&cht=bvs&chs=300x200&chd=s:JSGM9MY929w&chtt=Matt's+Mojo(chart background)!
|
25
156
|
|
26
|
-
h2. How to submit patches
|
27
157
|
|
28
|
-
|
158
|
+
h2. Repository
|
29
159
|
|
30
|
-
The trunk repository is <code>svn://rubyforge.org/var/svn/
|
160
|
+
The trunk repository is <code>svn://rubyforge.org/var/svn/Gchart/trunk</code> for anonymous access.
|
31
161
|
|
32
162
|
h2. License
|
33
163
|
|
@@ -35,5 +165,5 @@ This code is free to use under the terms of the MIT license.
|
|
35
165
|
|
36
166
|
h2. Contact
|
37
167
|
|
38
|
-
Comments are welcome. Send an email to "Matt Aimonetti":mailto:mattaimonetti@gmail.com
|
168
|
+
Comments are welcome. Send an email to "Matt Aimonetti":mailto:mattaimonetti@gmail.com
|
39
169
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|