<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>MinorProbrem&#187; &#8220;google chart api&#8221;</title>
	<atom:link href="http://hmlab.info/minor/tag/google-chart-api/feed/" rel="self" type="application/rss+xml" />
	<link>http://hmlab.info/minor</link>
	<description>グダグダ日記</description>
	<lastBuildDate>Wed, 27 Apr 2011 21:48:54 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://hmlab.info/minor/tag/google-chart-api/feed/" />
		<item>
		<title>MyMiniCityブログパーツユーザーの国別分布図をGoogle Chart APIで描いてみた</title>
		<link>http://hmlab.info/minor/2008/02/myminicitygoogle-char-api/</link>
		<comments>http://hmlab.info/minor/2008/02/myminicitygoogle-char-api/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 13:55:16 +0000</pubDate>
		<dc:creator>Hex68</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MyMiniCity]]></category>
		<category><![CDATA["google chart api"]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[MyMiniCityブログパーツ]]></category>

		<guid isPermaLink="false">http://hmlab.info/wordpress/2008/02/myminicitygoogle-char-api.html</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p>おかげ様でたくさんの方にご使用いただいているMyMiniCityブログパーツ。</p>
<p>MyminiCity上の架空の街。いったい、みなさんはどこの国に自分の街を設置してプレイされてるのかなー、と思って、ブラウザ上でグラフが簡単に描ける【Google Chart API】を使ってグラフ化してみました。</p>
</p>
<p><span id="more-3415"></span><br />
<script src="http://hmlab.info/minor/products/mmc/mmc.js" type="text/javascript"></script><script src="http://hmlab.info/minor/products/mmc/prototype.js" type="text/javascript"></script><img id="mmcgraph1" src="http://hmlab.info/movabletype/mt-static/html/editor-content.html?cs=UTF-8" />
<p>下がその内訳。</p>
<p>MyMiniCityブログパーツのPHPが呼ばれた時のログを読み込んで、現時点の国籍の分布を動的に描画しています。</p>
</p>
<p> <span id="mmchyou"></span><script type="text/javascript"></p>
<p>readmmc();</script>
</p>
<p>というかニッポンが圧倒的に多すぎて、他の国がよくわからないことに。</p>
<p>多くの人は実際の自分と同じ国を選ぶでしょうし、まあ当たり前かなという結果でした。</p>
<p>（＊国、といってもユーザーの実際の国籍ではなくて、MyMiniCity上の国籍のことです。）</p>
<p></p>
<p></p>
<p><a href="http://code.google.com/apis/chart/" target="_blank">Google Chart API</a></p>
<p>&nbsp;</p>
<p>Googleさんから先日公開されたAPIなんですが、これがけっこう楽しい。</p>
<p>javascriptとかPHPでグラフを書こうとすると意外にめんどくさいし、Excelなんかでグラフを作成してアップロードだと当然動的なグラフ作成はできないしでう～ん、ってところなんですが、これをつかうとかなり楽チン。</p>
<p>&nbsp;</p>
<p>ざっくりと説明すると、Google Chart APIのURLにパラメーターを付与すると、グラフ化された画像が帰ってくる仕組みです。で、それを&lt;img&gt;タグのsrcで受けると。</p>
<p>&nbsp;</p>
<p>例：&lt;img src=&#8221;<code><a href="http://chart.apis.google.com/chart?cht=p3&amp;chd=s:hW&amp;chs=250x100&amp;chl=Hello%7CWorld">http://chart.apis.google.com/chart?cht=p3&amp;chd=s:hW&amp;chs=250x100&amp;chl=Hello|World</a>"&gt;</code></p>
<p> <img src="http://chart.apis.google.com/chart?cht=p3&amp;chd=s:hW&amp;chs=250x100&amp;chl=Hello%7CWorld" />
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>グラフの種類も円グラフ、棒グラフ、折れ線、散布図など一通り揃っています。</p>
<p>残念なのは、キャプションが日本語に対応していなくて、文字化けしてしまうこと。「Japan」を「日本」なんて書くとワケが判らないことになります。</p>
<p>そこに目をつぶれば、ブログ上や自分のサイト上に、気軽にグラフを描画することができますね。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>まあ普通、そんなに<strong>グラフを描く機会もない</strong>んですけど。</p>
]]></content:encoded>
			<wfw:commentRss>http://hmlab.info/minor/2008/02/myminicitygoogle-char-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://hmlab.info/minor/2008/02/myminicitygoogle-char-api/" />
	</item>
	</channel>
</rss>

