mokolabs-googlecharts 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/website/index.txt ADDED
@@ -0,0 +1,492 @@
1
+ h1. Googlecharts
2
+
3
+ h2. → 'Sexy Charts using Google API & Ruby'
4
+
5
+
6
+ h2. What
7
+
8
+ A nice and simple wrapper for "Google Chart API":http://code.google.com/apis/chart/
9
+
10
+ h2. Installing
11
+
12
+ This project is now hosted at "GitHub":http://github.com
13
+ If you never added "GitHub":http://github.com as a gem source, you will need to do the following:
14
+ <pre syntax="ruby">$ gem sources -a http://gems.github.com/</pre> (you only need to do this once)
15
+
16
+ <pre syntax="ruby">$ sudo gem install mattetti-googlecharts</pre>
17
+
18
+ or <pre syntax="ruby">$ sudo gem install googlecharts</pre>
19
+
20
+ h2. The basics
21
+
22
+ This gem supports the following types of charts:
23
+
24
+ !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()
25
+
26
+ !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()
27
+
28
+ !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()
29
+
30
+ !http://chart.apis.google.com/chart?cht=bvg&chs=200x125&chd=s:hello,world&chco=cc0000,00aa00(bar)! Gchart.bar()
31
+
32
+ !http://chart.apis.google.com/chart?cht=v&chs=200x100&chd=t:100,80,60,30,30,30,10(venn)! Gchart.venn()
33
+
34
+ !http://chart.apis.google.com/chart?cht=p&chd=s:world5&chs=200x125&chl=A|B|C|D|E|Fe(pie)! Gchart.pie()
35
+
36
+ !http://chart.apis.google.com/chart?cht=p3&chd=s:Uf9a&chs=200x100&chl=A|B|C|D(pie_3d)! Gchart.pie_3d()
37
+
38
+ !http://chart.apis.google.com/chart?chs=100x20&cht=ls&chco=0077CC&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=t:27,25,25,25,25,27,100,31,25,36,25,25,39,25,31,25,25,25,26,26,25,25,28,25,25,100,28,27,31,25,27,27,29,25,27,26,26,25,26,26,35,33,34,25,26,25,36,25,26,37,33,33,37,37,39,25,25,25,25(sparkline)!Gchart.sparkline()
39
+
40
+ !http://chart.apis.google.com/chart?chs=225x125&cht=gom&chd=t:70&chl=Flavor(google-o-meter)! Gchart.meter()
41
+
42
+ h2. Demonstration of usage
43
+
44
+ install:
45
+
46
+ <code>sudo gem install mattetti-googlecharts</code>
47
+
48
+ or use rubyforge:
49
+
50
+ <code>sudo gem install googlecharts</code>
51
+
52
+ require:
53
+ <pre syntax="ruby">require 'gchart'</pre>
54
+
55
+ <pre syntax="ruby">
56
+ Gchart.line(:size => '200x300',
57
+ :title => "example title",
58
+ :bg => 'efefef',
59
+ :legend => ['first data set label', 'second data set label'],
60
+ :data => [10, 30, 120, 45, 72])</pre>
61
+
62
+ ---
63
+
64
+ *simple line chart*
65
+ <pre syntax="ruby">
66
+ Gchart.line(:data => [0, 40, 10, 70, 20])
67
+ </pre>
68
+
69
+ Generate the following url: http://chart.apis.google.com/chart?chs=300x200&chd=s:AiI9R&cht=lc
70
+
71
+ Inserted in an image tag, it will look like that:
72
+
73
+ !http://chart.apis.google.com/chart?chs=300x200&chd=s:AiI9R&cht=lc(simple line chart)!
74
+
75
+ *multiple line charts*
76
+ <pre syntax="ruby">
77
+ Gchart.line(:data => [[0, 40, 10, 70, 20],[41, 10, 80, 50]])
78
+ </pre>
79
+
80
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:AeH1P,fH9m(multiple lines chart)!
81
+
82
+ *set line colors*
83
+
84
+ <pre syntax="ruby">
85
+ Gchart.line(:data => [[0, 40, 10, 70, 20],[41, 10, 80, 50]], :line_colors => "FF0000,00FF00")
86
+ </pre>
87
+
88
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:AeH1P,fH9m&chco=FF0000,00FF00(line colors)!
89
+
90
+ "more info about color settings":http://code.google.com/apis/chart/#chart_colors
91
+
92
+ *sparkline chart*
93
+
94
+ <pre syntax="ruby">
95
+ data = [27,25,25,25,25,27,100,31,25,36,25,25,39,25,31,25,25,25,26,26,25,25,28,25,25,100,28,27,31,25,27,27,29,25,27,26,26,25,26,26,35,33,34,25,26,25,36,25,26,37,33,33,37,37,39,25,25,25,25]
96
+ Gchart.sparkline(:data => data, :size => '120x40', :line_colors => '0077CC')
97
+ </pre>
98
+
99
+ !http://chart.apis.google.com/chart?chd=s:QPPPPQ9SPVPPXPSPPPPPPPRPP9RQSPQQRPQPPPPPVUUPPPVPPWUUWWXPPPP&chco=0077CC&chs=120x40&cht=ls(sparline)!
100
+
101
+ A sparkline chart has exactly the same parameters as a line chart. The only difference is that the axes lines are not drawn for sparklines by default.
102
+
103
+ *bar chart*
104
+
105
+ <pre syntax="ruby">
106
+ Gchart.bar(:data => [300, 100, 30, 200])
107
+ </pre>
108
+ !http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:9UGo(bars)!
109
+
110
+ *set the bar chart orientation*
111
+
112
+ <pre syntax="ruby">
113
+ Gchart.bar(:data => [300, 100, 30, 200], :orientation => 'horizontal')
114
+ </pre>
115
+ !http://chart.apis.google.com/chart?cht=bhs&chs=300x200&chd=s:9UGo(bars)!
116
+
117
+ *multiple bars chart*
118
+
119
+ <pre syntax="ruby">
120
+ Gchart.bar(:data => [[300, 100, 30, 200], [100, 200, 300, 10]])
121
+ </pre>
122
+
123
+ !http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:9UGo,Uo9C(stacked multiple bars)!
124
+
125
+ The problem is that by default the bars are stacked, so we need to set the colors:
126
+
127
+ <pre syntax="ruby">
128
+ Gchart.bar(:data => [[300, 100, 30, 200], [100, 200, 300, 10]], :bar_colors => 'FF0000,00FF00')
129
+ </pre>
130
+
131
+ If you prefer you can use this other syntax:
132
+
133
+ <pre syntax="ruby">
134
+ Gchart.bar(:data => [[300, 100, 30, 200], [100, 200, 300, 10]], :bar_colors => ['FF0000', '00FF00'])
135
+ </pre>
136
+
137
+ !http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:9UGo,Uo9C&chco=FF0000,00FF00(colors)!
138
+
139
+ The problem now, is that we can't see the first value of the second dataset since it's lower than the first value of the first dataset. Let's unstack the bars:
140
+
141
+ <pre syntax="ruby">
142
+ Gchart.bar(:data => [[300, 100, 30, 200], [100, 200, 300, 10]],
143
+ :bar_colors => 'FF0000,00FF00',
144
+ :stacked => false )
145
+ </pre>
146
+
147
+ !http://chart.apis.google.com/chart?cht=bvg&chs=300x200&chd=s:9UGo,Uo9C&chco=FF0000,00FF00(grouped bars)!
148
+
149
+ *bar chart width and spacing*
150
+
151
+ A bar chart can accept options to set the width of the bars, spacing between bars and spacing between bar groups. To set these, you can either provide a string, array or hash.
152
+
153
+ The Google API sets these options in the order of width, spacing, and group spacing, with both spacing values being optional. So, if you provide a string or array, provide them in that order:
154
+
155
+ <pre syntax="ruby">
156
+ Gchart.bar(:data => @data, :bar_width_and_spacing => '25,6') # width of 25, spacing of 6
157
+ Gchart.bar(:data => @data, :bar_width_and_spacing => '25,6,12') # width of 25, spacing of 6, group spacing of 12
158
+ Gchart.bar(:data => @data, :bar_width_and_spacing => [25,6]) # width of 25, spacing of 6
159
+ Gchart.bar(:data => @data, :bar_width_and_spacing => 25) # width of 25
160
+ </pre>
161
+
162
+ The hash lets you set these values directly, with the Google default values set for any options you don't include:
163
+
164
+ <pre syntax="ruby">
165
+ Gchart.bar(:data => @data, :bar_width_and_spacing => {:width => 19})
166
+ Gchart.bar(:data => @data, :bar_width_and_spacing => {:spacing => 10, :group_spacing => 12})
167
+ </pre>
168
+
169
+
170
+ *pie chart*
171
+
172
+ <pre syntax="ruby">
173
+ Gchart.pie(:data => [20, 35, 45])
174
+ </pre>
175
+ !http://chart.apis.google.com/chart?cht=p&chs=300x200&chd=s:bv9(Pie Chart)!
176
+
177
+ *3D pie chart*
178
+
179
+ <pre syntax="ruby">
180
+ Gchart.pie_3d(:data => [20, 35, 45])
181
+ </pre>
182
+ !http://chart.apis.google.com/chart?cht=p3&chs=300x200&chd=s:bv9(Pie Chart)!
183
+
184
+ *venn diagram*
185
+
186
+ "Google documentation":http://code.google.com/apis/chart/#venn
187
+
188
+ Data set:
189
+ * the first three values specify the relative sizes of three circles, A, B, and C
190
+ * the fourth value specifies the area of A intersecting B
191
+ * the fifth value specifies the area of B intersecting C
192
+ * the sixth value specifies the area of C intersecting A
193
+ * the seventh value specifies the area of A intersecting B intersecting C
194
+
195
+ <pre syntax="ruby">
196
+ Gchart.venn(:data => [100, 80, 60, 30, 30, 30, 10])
197
+ </pre>
198
+ !http://chart.apis.google.com/chart?cht=v&chs=300x200&chd=s:9wkSSSG(Venn)!
199
+
200
+ *scatter plot*
201
+
202
+ "Google Documentation":http://code.google.com/apis/chart/#scatter_plot
203
+
204
+ Supply two data sets, the first data set specifies x coordinates, the second set specifies y coordinates, the third set the data point size.
205
+
206
+ <pre syntax="ruby">
207
+ Gchart.scatter(:data => [[1, 2, 3, 4, 5], [1, 2, 3, 4 ,5], [5, 4, 3, 2, 1]])
208
+ </pre>
209
+
210
+ !http://chart.apis.google.com/chart?cht=s&chs=300x200&chd=s:MYkw9,MYkw9,9wkYM(scatter)!
211
+
212
+ *google-o-meter*
213
+
214
+ "Google Documentation":http://code.google.com/apis/chart/#gom
215
+
216
+ Supply a single label that will be what the arrow points to. It only supports a solid fill for the background.
217
+
218
+ <pre syntax="ruby">
219
+ Gchart.meter(:data => [70], :label => ['Flavor'])
220
+ </pre>
221
+
222
+ ---
223
+
224
+ *set a chart title*
225
+
226
+ <pre syntax="ruby">
227
+ Gchart.bar(:title => "Recent Chart Sexyness", :data => [15, 30, 10, 20, 100, 20, 40, 100])
228
+ </pre>
229
+
230
+ !http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:JSGM9MY9&chtt=Recent+Chart+Sexyness(chart title)!
231
+
232
+ *set the title size*
233
+
234
+ <pre syntax="ruby">
235
+ Gchart.bar(:title => "Recent Chart Sexyness", :title_size => 20, :data => [15, 30, 10, 20, 100, 20, 40, 100])
236
+ </pre>
237
+
238
+ !http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:JSGM9MY9&chtt=Recent+Chart+Sexyness&chts=454545,20(title size)!
239
+
240
+ *set the title color*
241
+
242
+ <pre syntax="ruby">
243
+ Gchart.bar(:title => "Recent Chart Sexyness", :title_color => 'FF0000', :data => [15, 30, 10, 20, 100, 20, 40, 100])
244
+ </pre>
245
+
246
+ !http://chart.apis.google.com/chart?cht=bvs&chs=300x200&chd=s:JSGM9MY9&chtt=Recent+Chart+Sexyness&chts=FF0000(Title color)!
247
+
248
+ *set the chart's size*
249
+
250
+ <pre syntax="ruby">
251
+ Gchart.bar(:title => "Recent Chart Sexyness",
252
+ :data => [15, 30, 10, 20, 100, 20, 40, 100],
253
+ :size => '600x400')
254
+ </pre>
255
+
256
+ !http://chart.apis.google.com/chart?cht=bvs&chs=600x400&chd=s:JSGM9MY9&chtt=Recent+Chart+Sexyness(size)!
257
+
258
+ *set the image background color*
259
+
260
+ <pre syntax="ruby">
261
+ Gchart.bar(:title => "Matt's Mojo",
262
+ :data => [15, 30, 10, 20, 100, 20, 40, 100, 90, 100, 80],
263
+ :background => 'FF9994')
264
+ </pre>
265
+
266
+ !http://chart.apis.google.com/chart?chf=bg,s,FF9994&cht=bvs&chs=300x200&chd=s:JSGM9MY929w&chtt=Matt's+Mojo(Background)!
267
+
268
+ *set the chart background color*
269
+
270
+ <pre syntax="ruby">
271
+ Gchart.bar(:title => "Matt's Mojo",
272
+ :data => [15, 30, 10, 20, 100, 20, 40, 100, 90, 100, 80],
273
+ :background => 'FF9994', :chart_background => '000000')
274
+ </pre>
275
+
276
+ !http://chart.apis.google.com/chart?chf=c,s,000000|bg,s,FF9994&cht=bvs&chs=300x200&chd=s:JSGM9MY929w&chtt=Matt's+Mojo(chart background)!
277
+
278
+ *Set bar/line colors*
279
+
280
+ <pre syntax="ruby">
281
+ Gchart.bar(:title => "Matt's Mojo",
282
+ :data => [15, 30, 10, 20, 100, 20, 40, 100, 90, 100, 80],
283
+ :bar_colors => '76A4FB',
284
+ :background => 'EEEEEE', :chart_background => 'CCCCCC')
285
+ </pre>
286
+
287
+ !http://chart.apis.google.com/chart?chf=c,s,CCCCCC|bg,s,EEEEEE&cht=bvs&chs=300x200&chd=s:JSGM9MY929w&chco=76A4FB&chtt=Matt's+Mojo(bar colors)!
288
+
289
+ <pre syntax="ruby">
290
+ Gchart.line(:title => "Matt's Mojo",
291
+ :data => [15, 30, 10, 20, 100, 20, 40, 100, 90, 100, 80],
292
+ :line_colors => '76A4FB')
293
+ </pre>
294
+
295
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:JSGM9MY929w&chco=76A4FB&chtt=Matt's+Mojo(line colors)!
296
+
297
+ *legend / labels*
298
+
299
+ <pre syntax="ruby">
300
+ Gchart.bar(:title => "Matt vs Rob",
301
+ :data => [[300, 100, 30, 200], [100, 200, 300, 10]],
302
+ :bar_colors => 'FF0000,00FF00',
303
+ :stacked => false, :size => '400x200',
304
+ :legend => ["Matt's Mojo", "Rob's Mojo"] )
305
+ </pre>
306
+ !http://chart.apis.google.com/chart?cht=bvg&chdl=Matt's+Mojo|Rob's+Mojo&chs=400x200&chd=s:9UGo,Uo9C&chco=FF0000,00FF00&chtt=Matt+vs+Rob(legend)!
307
+
308
+ <pre syntax="ruby">
309
+ Gchart.line(:title => "Matt vs Rob",
310
+ :data => [[300, 100, 30, 200], [100, 200, 300, 10]],
311
+ :bar_colors => ['FF0000','00FF00'],
312
+ :stacked => false, :size => '400x200',
313
+ :legend => ["Matt's Mojo", "Rob's Mojo"] )
314
+ </pre>
315
+ !http://chart.apis.google.com/chart?cht=lc&chdl=Matt's+Mojo|Rob's+Mojo&chs=400x200&chd=s:9UGo,Uo9C&chco=FF0000,00FF00&chtt=Matt+vs+Rob(line legend)!
316
+
317
+
318
+ <pre syntax="ruby">
319
+ Gchart.pie_3d(:title => 'ruby_fu', :size => '400x200',
320
+ :data => [10, 45, 45], :labels => ["DHH", "Rob", "Matt"] )
321
+ </pre>
322
+
323
+ !http://chart.apis.google.com/chart?cht=p3&chl=DHH|Rob|Matt&chs=400x200&chd=s:N99&chtt=ruby_fu(labels)!
324
+
325
+ *Display axis labels*
326
+
327
+ <pre syntax="ruby">
328
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :axis_with_labels => 'x,y,r')
329
+ </pre>
330
+
331
+ or you can use the other syntax:
332
+
333
+ <pre syntax="ruby">
334
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :axis_with_labels => ['x','y','r'])
335
+ </pre>
336
+
337
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chxt=x,y,r&chd=s:9UGoUo9C(axis with labels)!
338
+
339
+ <pre syntax="ruby">
340
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :axis_with_labels => 'x',
341
+ :axis_labels => ['Jan|July|Jan|July|Jan'])
342
+ </pre>
343
+
344
+ or you can use the other syntax:
345
+
346
+ <pre syntax="ruby">
347
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :axis_with_labels => 'x',
348
+ :axis_labels => ['Jan','July','Jan','July','Jan'])
349
+ </pre>
350
+
351
+ !http://chart.apis.google.com/chart?cht=lc&chxl=0:|Jan|July|Jan|July|Jan&chs=300x200&chxt=x&chd=s:9UGoUo9C(x labels)!
352
+
353
+ *multiple axis labels*
354
+
355
+ <pre syntax="ruby">
356
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :axis_with_labels => 'x,r',
357
+ :axis_labels => ['Jan|July|Jan|July|Jan', '2005|2006|2007'])
358
+ </pre>
359
+
360
+ or
361
+
362
+ <pre syntax="ruby">
363
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :axis_with_labels => 'x,r',
364
+ :axis_labels => [['Jan','July','Jan','July','Jan'], ['2005','2006','2007']])
365
+ </pre>
366
+
367
+ !http://chart.apis.google.com/chart?cht=lc&chxl=0:|Jan|July|Jan|July|Jan|1:|2005|2006|2007&chs=300x200&chxt=x,r&chd=s:9UGoUo9C(multiple axis labels)!
368
+
369
+ (This syntax will probably be improved in the future)
370
+
371
+ *custom params*
372
+
373
+ I certainly didn't cover the entire API, if you want to add your own params:
374
+
375
+ <pre syntax="ruby">
376
+ Gchart.line(:custom => 'chd=s:93zyvneTTOMJMLIJFHEAECFJGHDBFCFIERcgnpy45879,IJKNUWUWYdnswz047977315533zy1246872tnkgcaZQONHCECAAAAEII&chls=3,6,3|1,1,0')
377
+ </pre>
378
+
379
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:93zyvneTTOMJMLIJFHEAECFJGHDBFCFIERcgnpy45879,IJKNUWUWYdnswz047977315533zy1246872tnkgcaZQONHCECAAAAEII&chls=3,6,3|1,1,0(Custom)!
380
+
381
+ ---
382
+
383
+ *Save the chart as a file*
384
+
385
+ You might prefer to save the chart instead of using the url, not a problem:
386
+
387
+ <pre syntax="ruby">
388
+ Gchart.line(:data => [0, 26], :format => 'file')
389
+ </pre>
390
+
391
+ You might want to specify the path and/or the filename used to save your chart:
392
+
393
+ <pre syntax="ruby">
394
+ Gchart.line(:data => [0, 26], :format => 'file', :filename => 'custom_filename.png')
395
+ </pre>
396
+
397
+ *Insert as an image tag*
398
+
399
+ Because, I'm lazy, you can generate a full image tag, with support for the standard html options.
400
+
401
+ <pre syntax="ruby">
402
+ Gchart.line(:data => [0, 26], :format => 'image_tag')
403
+ </pre>
404
+
405
+ <pre syntax="ruby">
406
+ <img src="http://chart.apis.google.com/chart?chs=300x200&chd=s:A9&cht=lc" width="300" height="200" alt="Google Chart" />
407
+ </pre>
408
+
409
+ Here are a few more examples:
410
+
411
+ <pre syntax="ruby">
412
+ Gchart.line(:data => [0, 26], :format => 'image_tag')
413
+ Gchart.line(:data => [0, 26], :format => 'image_tag', :id => "sexy")
414
+ Gchart.line(:data => [0, 26], :format => 'image_tag', :class => "chart")
415
+ Gchart.line(:data => [0, 26], :format => 'image_tag', :alt => "Sexy Chart")
416
+ Gchart.line(:data => [0, 26], :format => 'image_tag', :title => "Sexy Chart")
417
+ </pre>
418
+
419
+ Image dimensions will be automatically set based on your chart's size.
420
+
421
+ ---
422
+
423
+ *Encoding*
424
+
425
+ Google Chart API offers "3 types of data encoding":http://code.google.com/apis/chart/#chart_data
426
+
427
+ * simple
428
+ * text
429
+ * extended
430
+
431
+ By default this library uses the simple encoding, if you need a different type of encoding, you can change it really easily:
432
+
433
+ default / simple: chd=s:9UGoUo9C
434
+ <pre syntax="ruby">
435
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10] )
436
+ </pre>
437
+
438
+ extended: chd=e:..VVGZqqVVqq..CI
439
+ <pre syntax="ruby">
440
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :encoding => 'extended' )
441
+ </pre>
442
+
443
+ text: chd=t:300,100,30,200,100,200,300,10
444
+ <pre syntax="ruby">
445
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :encoding => 'text' )
446
+ </pre>
447
+
448
+ (note that the text encoding doesn't use a max value and therefore should be under 100)
449
+
450
+ *Max value*
451
+
452
+ Simple and extended encoding support the max value option.
453
+
454
+ The max value option is a simple way of scaling your graph. The data is converted in chart value with the highest chart value being the highest point on the graph. By default, the calculation is done for you. However you can specify your own maximum or not use a maximum at all.
455
+
456
+ <pre syntax="ruby">
457
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10] )
458
+ </pre>
459
+
460
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:9UGoUo9C(Title)!
461
+
462
+ <pre syntax="ruby">
463
+ Gchart.line(:data => [300, 100, 30, 200, 100, 200, 300, 10], :max_value => 500 )
464
+ </pre>
465
+
466
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:kMDYMYkB(max 500)!
467
+
468
+ <pre syntax="ruby">
469
+ Gchart.line(:data => [100, 20, 30, 20, 10, 14, 30, 10], :max_value => false )
470
+ </pre>
471
+
472
+ !http://chart.apis.google.com/chart?cht=lc&chs=300x200&chd=s:_UeUKOeK(real size)!
473
+
474
+
475
+
476
+ h2. Repository
477
+
478
+ The trunk repository is <code>http://github.com/mattetti/googlecharts/</code> for anonymous access.
479
+
480
+ h2. License
481
+
482
+ This code is free to use under the terms of the MIT license.
483
+
484
+ h2. Contact
485
+
486
+ Comments are welcome. Send an email to "Matt Aimonetti":mailto:mattaimonetti@gmail.com
487
+
488
+ h3. Contributors
489
+
490
+ "David Grandinetti":http://github.com/dbgrandi
491
+ "Toby Sterrett":http://github.com/takeo
492
+ "Patrick Crowley":http://github.com/mokolabs
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mokolabs-googlecharts
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.3.3
5
+ platform: ruby
6
+ authors:
7
+ - Matt Aimonetti
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-05-07 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Sexy Charts using Google API & Ruby
17
+ email: mattaimonetti@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - History.txt
24
+ - License.txt
25
+ - Manifest.txt
26
+ - README.txt
27
+ - website/index.txt
28
+ files:
29
+ - History.txt
30
+ - License.txt
31
+ - Manifest.txt
32
+ - README.txt
33
+ - Rakefile
34
+ - config/hoe.rb
35
+ - config/requirements.rb
36
+ - lib/gchart.rb
37
+ - lib/gchart/aliases.rb
38
+ - lib/gchart/version.rb
39
+ - setup.rb
40
+ - spec/gchart_spec.rb
41
+ - spec/spec.opts
42
+ - spec/spec_helper.rb
43
+ - tasks/environment.rake
44
+ - tasks/rspec.rake
45
+ - website/index.txt
46
+ has_rdoc: true
47
+ homepage: http://googlecharts.rubyforge.org
48
+ post_install_message:
49
+ rdoc_options:
50
+ - --main
51
+ - README.txt
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: "0"
59
+ version:
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: "0"
65
+ version:
66
+ requirements: []
67
+
68
+ rubyforge_project: googlecharts
69
+ rubygems_version: 1.2.0
70
+ signing_key:
71
+ specification_version: 2
72
+ summary: Sexy Charts using Google API & Ruby
73
+ test_files: []
74
+