function GoogleChart(id, title, tcolor, tsize, type, bwidth, labels, legends, colors, bgfill, width, height, data)
{
var types =
{
'line' : 'lc',
'vbar' : 'bvg',
'hbar' : 'bhg',
'gometer' : 'gom',
'pie' : 'p',
'pie3d' : 'p3',
'venn' : 'v',
'radar' : 'r'
}
if (typeof type == undefined) type = 'pie'
var t1 = escape(title)
var t2 = types[type]
var tail = 'chtt=' + t1
+ '&cht=' + t2
+ '&chs=' + width + 'x' + height
+ '&chbh=' + bwidth
+ '&chxt=x,y'
+ '&chd=t:' + data
if (tcolor && tsize) tail += '&chts=' + tcolor + ',' + tsize
if (labels) tail += '&chl=' + labels
if (legends) tail += '&chdl=' + legends
if (colors) tail += '&chco=' + colors
if (bgfill) tail += '&chf=bg,s,' + bgfill
Htmlgraft(id, "
")
}
function Htmlgraft(id, value) {
if (typeof value != undefined);
document.getElementById(id).innerHTML = value;
return document.getElementById(id).innerHTML;
}
Nessun commento
You can leave the first : )