Option Explicit
Sub main()
Dim s
s = _
"1492,1596,1474,1611,1589,1749,1630,1619,1632,1685,1691,1637,1703,1627,1672,1611,1710,1645,1640,1570,1599," & _
"1525,1585,1511,1615,1511,1585,1473,2390,1693,1597,1550,1606,1578,1543,1539,1570,1552,1589,1545,1620,1607," & _
"1612,1647,1476,1445,1482,1478,1463,1419,1498,1503,1520,1537,1459,1531,1501,1511,1469,1478,1476,1504,1519," & _
"1499,1435,1422,1420,1303,1367,1340,1380,1374,1342,1308,1373,1415,1426,1399,1426,1420,1347,1421,1459,1459," & _
"1438,1397,1454,1462,1518,1475,1514,1460,1510,1463,1515,1498,1510,1456,1503,1590,1543,1634,1649,2449,1774," & _
"1915,1840,1890,1744,1779,1663,1726,1756,1716,1637,1680,1674,1713,1724,1660,2013,1650,2037,2622,1886,1555," & _
"1466,1535,1452,1482,1537,1387,1412,1381,1407,1252,1671,1284,1377,1264,1266,1342,1376,1323,1108,1234,1261"
s = "100,0,0,100,100"
Debug.Print chd_t1(s)
Debug.Print chd_s1(s)
Debug.Print chd_e1(s)
End Sub
Function chd_t1(s)
'http://chart.apis.google.com/chart?chs=250x200&cht=ls&chco=0077CC&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=t:57,61,56
Dim a, i, a0, a1, b
a = Split(s, ",")
a0 = a(0)
a1 = a(0)
For i = 0 To UBound(a)
If a0 > a(i) Then a0 = a(i)
If a1 < a(i) Then a1 = a(i)
Next
ReDim b(UBound(a))
For i = 0 To UBound(a)
b(i) = Round(100# / a1 * a(i), 0) ' absolute
Next
chd_t1 = Replace(Replace(Join(b, "|"), ",", "."), "|", ",")
End Function
Function chd_s1(s)
'http://chart.apis.google.com/chart?chs=250x200&cht=ls&chco=0077CC&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=s:ililloml
Dim t, a, a0&, a1&, i
t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
a = Split(s, ",")
a0 = a(0)
a1 = a(0)
For i = 0 To UBound(a)
If a0 > a(i) Then a0 = a(i)
If a1 < a(i) Then a1 = a(i)
Next
ReDim b(UBound(a))
For i = 0 To UBound(a)
b(i) = Mid(t, Round(62 * a(i) / a1, 0) + 1, 1)
Next
chd_s1 = Join(b, ".")
End Function
Function chd_e1(s)
'http://chart.apis.google.com/chart?chs=250x200&cht=ls&chco=0077CC&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=e:jbl9i.mV
Dim t, a, a0, a1, i, x
t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-."
a = Split(s, ",")
a0 = a(0)
a1 = a(0)
For i = 0 To UBound(a)
If a0 > a(i) Then a0 = a(i)
If a1 < a(i) Then a1 = a(i)
Next
ReDim b(UBound(a))
For i = 0 To UBound(a)
x = Round(a(i) / a1 * 4096, 0)
b(i) = _
Mid(t, x \ 64 + 1, 1) & _
Mid(t, x - (x \ 64) * 64 + 1, 1)
Next
chd_e1 = Join(b, "")
End Function
Showing posts with label Google Chart API. Show all posts
Showing posts with label Google Chart API. Show all posts
Monday, July 28, 2008
GCHARTS: encode (vbscript)
encode: text (0..100), simple(62), extended (4096)
Sunday, July 27, 2008
gchart4mw: Google Chart Mediawiki extension
gchart4mw is a mediawiki-extension for visualizing data in wiki pages. To do so it provides a couple of additional tags for embedding different chart-types. Possible charts are
lines
bars
pie-charts
Tuesday, July 22, 2008
ngchart - .NET class library to work with Google Chart API
ngchart - .NET class library to work with Google Chart API
- samples
- download (v0.6.0.0)
Friday, February 8, 2008
Google Charting Tool (Line Charts, Sparklines)
Google Charting Tool (Line Charts, Sparklines)
A simple charting interface and code generator for the Google Chart API.
A simple charting interface and code generator for the Google Chart API.
Google Chart API Wrappers
Google Chart API Wrappers
Google released their Google Chart API and spawned a flurry of activity culminating in wrappers for these languages:
Google released their Google Chart API and spawned a flurry of activity culminating in wrappers for these languages:
Friday, February 1, 2008
Saturday, January 19, 2008
Generating charts from accessible data tables and vice versa using the Google Charts API
Generating charts from accessible data tables and vice versa using the Google Charts API
This is why I wrote a small script that converts data tables to charts using the API and a wee bit of JavaScript.
Check out the demo page and download the script with the demo page and CSS to have a go with it yourself.
This is why I wrote a small script that converts data tables to charts using the API and a wee bit of JavaScript.
Check out the demo page and download the script with the demo page and CSS to have a go with it yourself.
Friday, January 11, 2008
Sparklines with Google Chart API
Sparklines with Google Chart API (Google Analytics Style)
A Google Analytics sparkline:

https://www.google.com/analytics/reporting/sparkline?p=vvt1f3iczaycs7vjs6eahxyauuu0znswgdiuzzv8sauimebsc1g9faeggabx8j

http://chart.apis.google.com/chart?chxl=0:1:&chxs=0,000000,10,0,_1,000000,10,0,_&cht=lc&chxt=x,y&chs=100x50&chco=0077CC&chm=B,E6F2FA,0,0,0&chd=e:vvt1f3iczaycs7vjs6eahxyauuu0znswgdiuzzv8sauimebsc1g9faeggabx8

http://chart.apis.google.com/chart?cht=lfi&chs=75x30&chco=0077CC&chm=B,E6F2FA,0,0,0&chd=e:vvt1f3iczaycs7vjs6eahxyauuu0znswgdiuzzv8sauimebsc1g9faeggabx8
A Google Analytics sparkline:
https://www.google.com/analytics/reporting/sparkline?p=vvt1f3iczaycs7vjs6eahxyauuu0znswgdiuzzv8sauimebsc1g9faeggabx8j
http://chart.apis.google.com/chart?chxl=0:1:&chxs=0,000000,10,0,_1,000000,10,0,_&cht=lc&chxt=x,y&chs=100x50&chco=0077CC&chm=B,E6F2FA,0,0,0&chd=e:vvt1f3iczaycs7vjs6eahxyauuu0znswgdiuzzv8sauimebsc1g9faeggabx8
http://chart.apis.google.com/chart?cht=lfi&chs=75x30&chco=0077CC&chm=B,E6F2FA,0,0,0&chd=e:vvt1f3iczaycs7vjs6eahxyauuu0znswgdiuzzv8sauimebsc1g9faeggabx8
Subscribe to:
Posts (Atom)