{"id":6156,"date":"2007-12-07T08:22:43","date_gmt":"2007-12-07T08:22:43","guid":{"rendered":"http:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/e-commerce\/google-chart-api-2008-mashup-fuel.html"},"modified":"2007-12-07T08:22:43","modified_gmt":"2007-12-07T08:22:43","slug":"google-chart-api-2008-mashup-fuel","status":"publish","type":"post","link":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/technology\/google-chart-api-2008-mashup-fuel.html","title":{"rendered":"Google Chart API: 2008 Mashup Fuel"},"content":{"rendered":"<div style=\"MARGIN: 0in 0in 0pt\">With all the talk of web mashups I find it amazing that the most interesting ones still seem to be map-based and especially revolve around the <a href=\"http:\/\/code.google.com\/apis\/maps\/\">Google Map API<\/a>. Although Google doesn&rsquo;t monetize this API, the free publicity the company has received because of this application programming interface is immense.<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">So if mapping APIs was the first phase of mashups, will the second phase be charts? It would seem we may find out soon as <a href=\"http:\/\/blogoscoped.com\/archive\/2007-12-06-n80.html\">according to<\/a> Google Blogoscoped the new <a href=\"http:\/\/code.google.com\/apis\/chart\/\">Google Chart API<\/a> allows you to display charts and graphs by sending parameters to the API and receiving a PNG graphic in return.<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">For example the following URL:<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">http:\/\/chart.apis.google.com\/chart?<br \/>\ncht=p3&amp;chd=t:40,49,20,2,2,2&amp;chs=450&#215;225<br \/>\n&amp;chl=Avaya|Cisco|Nortel|Toshiba|NEC|Aastra<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">will yield the following chart:<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"http:\/\/chart.apis.google.com\/chart?cht=p3&amp;chd=t:40,49,20,2,2,2&amp;chs=450x225&amp;chl=Avaya|Cisco|Nortel|Toshiba|NEC|Aastra\" \/><\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/p>\n<div style=\"MARGIN: 0in 0in 0pt\">This is what the parameters mean:<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/div>\n<table style=\"BORDER-RIGHT: windowtext 1pt solid; BORDER-TOP: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 1pt solid\" cellpadding=\"0\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 135.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"181\">\n<pre><font size=\"2\">cht=p3<\/font><\/pre>\n<\/td>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 150.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"201\">\n<div style=\"MARGIN: 0in 0in 0pt\"><em>chart type: in this case, a pie chart. p would specify a flat pie chart<\/em><\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 135.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"181\">\n<pre><font size=\"2\">chd=t: 40,49,20,2,2,2<\/font><\/pre>\n<\/td>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 150.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"201\">\n<div style=\"MARGIN: 0in 0in 0pt\"><em>chart values: text-encoded, and separated by a comma<\/em><\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 135.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"181\">\n<pre><font size=\"2\">chs=450x225<\/font><\/pre>\n<\/td>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 150.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"201\">\n<div style=\"MARGIN: 0in 0in 0pt\"><em>custom chart size: 350&#215;150 pixels<\/em><\/div>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 135.5pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"181\">\n<pre><font size=\"2\">chl=Avaya|Cisco|Nortel<br \/>\n|Toshiba|NEC|Aastra<\/font><\/pre>\n<\/td>\n<td style=\"BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 0.75pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: windowtext 1pt solid; WIDTH: 150.75pt; PADDING-TOP: 0.75pt; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent\" width=\"201\">\n<div style=\"MARGIN: 0in 0in 0pt\"><em>Labels: separated by the pipe character<\/em><\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div style=\"MARGIN: 0in 0in 0pt\">&nbsp;<\/div>\n<div style=\"MARGIN: 0in 0in 0pt\">What I like about this service is how easy it is to generate the charts. Moreover there are lots of parameters you can choose that I didn&rsquo;t mention such as colors for the segments and background as well as resulting graphic label format.<\/p>\n<p><strong>Update<\/strong>: This is just a demo chart and is not meant to represent anything at all except a test of how the charting service works.<\/p>\n<p>Update 12\/08\/07:<\/p>\n<p>This code yileds the following chart (note there are colors specified in this case):<\/p>\n<p><font face=\"Verdana\" color=\"#333333\"><a href=\"http:\/\/chart.apis.google.com\/chart?cht=p3&amp;&amp;chco=ff0000,00ff00,0000ff&amp;chd=t:40,49,20,2,2,2,50,45&amp;chs=450x225&amp;chl=Avaya|Cisco|Nortel|Toshiba|NEC|Aastra|Scream|Tin%20Can\">http:\/\/chart.apis.google.com\/chart?cht=p3&amp;<br \/>\n&amp;chco=ff0000,00ff00,0000ff<br \/>\n&amp;chd=t:40,49,20,2,2,2,50,45&amp;chs=450&#215;225<br \/>\n&amp;chl=Avaya|Cisco|Nortel|Toshiba|<br \/>\nNEC|Aastra|Scream|Tin%20Can<\/a><\/p>\n<p><img decoding=\"async\" alt=\"\" hspace=\"3\" vspace=\"3\" src=\"http:\/\/chart.apis.google.com\/chart?cht=p3&amp;&amp;chco=ff0000,00ff00,0000ff&amp;chd=t:40,49,20,2,2,2,50,45&amp;chs=450x225&amp;chl=Avaya|Cisco|Nortel|Toshiba|NEC|Aastra|Scream|Tin%20Can\" \/><\/p>\n<p><\/font><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>With all the talk of web mashups I find it amazing that the most interesting ones still seem to be map-based and especially revolve around the Google Map API. Although Google doesn&rsquo;t monetize this API, the free publicity the company has received because of this application programming interface is immense. &nbsp; So if mapping APIs<\/p>\n","protected":false},"author":44,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[163,118],"tags":[],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/posts\/6156"}],"collection":[{"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/comments?post=6156"}],"version-history":[{"count":0,"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/posts\/6156\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/media?parent=6156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/categories?post=6156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tmcnet.com\/blog\/rich-tehrani\/wp-json\/wp\/v2\/tags?post=6156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}