Bu gibi:
Data returned from the query, in a table:
fulldate hour handheld website irma hoc_client spreadsheet
2009-10-14 23:00:00 23 93 2 1 0 0
2009-10-15 00:00:00 00 15 1 2 0 0
2009-10-15 01:00:00 01 61 0 0 0 0
2009-10-15 02:00:00 02 25 2 0 0 0
2009-10-15 03:00:00 03 39 0 0 0 0
2009-10-15 04:00:00 04 91 5 1 0 0
2009-10-15 05:00:00 05 239 13 1 0 0
2009-10-15 06:00:00 06 443 14 14 0 0
2009-10-15 07:00:00 07 568 23 11 0 0
2009-10-15 08:00:00 08 613 37 59 0 0
2009-10-15 09:00:00 09 834 30 60 0 0
2009-10-15 10:00:00 10 1026 50 35 0 0
2009-10-15 11:00:00 11 938 62 45 0 0
2009-10-15 12:00:00 12 794 72 58 0 0
2009-10-15 13:00:00 13 708 71 39 0 0
2009-10-15 14:00:00 14 618 54 32 0 0
2009-10-15 15:00:00 15 336 64 14 0 0
2009-10-15 16:00:00 16 216 50 15 0 0
2009-10-15 17:00:00 17 225 24 6 0 0
2009-10-15 18:00:00 18 148 20 5 0 0
2009-10-15 19:00:00 19 182 9 4 0 0
2009-10-15 20:00:00 20 153 6 5 0 0
2009-10-15 21:00:00 21 102 2 1 0 0
2009-10-15 22:00:00 22 90 5 3 0 0
2009-10-15 23:00:00 23 56 3 3 0 0
The same data as a call to the chart api:
http://chart.apis.google.com/chart
?cht=bvs
&chtt=DVO Orders Per Hour
&chbh=a,1,3
&chs=700x200
&chxt=x,y
&chds=0,2000
&chxr=1,0,2000
&chco=FF0000,00C000,0000FF,FFFF00,9B30FF,EE00EE,000000,00F5FF,54FF9F,C0FF3E,FFC125
&chdl=Handheld|Website|IRMA|HOC Client|Spreadsheet
&chxl=0:|23|00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23
&chd=t:93,15,61,25,39,91,239,443,568,613,834,1026,938,794,708,618,336,216,225,148,182,153,102,90,56|2,1,0,2,0,5,13,14,23,37,30,50,62,72,71,54,64,50,24,20,9,6,2,5,3|1,2,0,0,0,1,1,14,11,59,60,35,45,58,39,32,14,15,6,5,4,5,1,3,3|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0|0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Yani farklı grafik türleri için biraz değişir, bir barchart - ama çok edebi var .. Excel'de gibi için "menzil hesaplamalar" hayır yapılır.
Perl, ben sorgu sonucu değerleri döngü ve çeşitli GAPI grafik değerleri doldurmak için dizeleri oluşturmak.
Sizin veri gibi bir dizeye inşa olacaktır:
http://chart.apis.google.com/chart
?cht=bvs
&chtt=My Spiffy Data
&chs=700x200
&chxt=x,y
&chds=0,40
&chxr=1,0,40
&chco=FF0000
&chdl=Data
&chxl=0:|0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20
&chd=t:27,28,15,16,16,16,22,19,42,24,38,21,33,25,21,16,12,11,5,8,2