Google Chart API で株価チャートを描く
ま、メモ程度に。
下記URLの改行を消して、どんな株価チャートが表示されるか試してみると良い。
http://chart.apis.google.com/
chart
?chs=430x315
&chf=c,s,efefef
&chg=0,10
&chtt=NISSHA%E3%80%907915%E3%80%91Candl%20chart
&cht=lc
&chds=30,40,30,40
&chd=
t0:
-1,37.60,38.55,38.45,37.00,33.60,32.70,32.30,34.00,34.55,-1
|-1,38.35,38.80,39.45,38.60,35.55,33.85,32.30,34.10,34.90,-1
|-1,38.50,38.75,38.55,37.65,33.75,32.80,33.80,34.50,34.90,-1
|-1,38.55,39.60,39.50,38.85,35.60,34.10,33.90,34.60,35.15,-1
&chm=F,000000,0,-1,20
&chxt=x,y,r,x
&chxl=
0:||1|2|3|4|5|8|9|10|12||
1:|30.0|40.00|
2:|30.0|40.00|
3:|||Feb||
それぞれのパラメータの、概ねの意味は下記の通り。
http://chart.apis.google.com/
chart
?chs=430x315 ←サイズ
&chf=c,s,efefef ←背景色
&chg=0,10 ←補助線(xのステップサイズ、yのステップサイズ)
&chtt=NISSHA%E3%80%907915%E3%80%91Candl%20chart ←上に出るグラフタイトル(UTF8エンコード)
&cht=lc ←ローソク足を表す
&chds=30,40,30,40 ←最大値,最小値
&chd=
t0:
-1,37.60,38.55,38.45,37.00,33.60,32.70,32.30,34.00,34.55,-1 ←底値
|-1,38.35,38.80,39.45,38.60,35.55,33.85,32.30,34.10,34.90,-1 ←始値
|-1,38.50,38.75,38.55,37.65,33.75,32.80,33.80,34.50,34.90,-1 ←終値
|-1,38.55,39.60,39.50,38.85,35.60,34.10,33.90,34.60,35.15,-1 ←高値
&chm=F,000000,0,-1,20 ←20だけ注目しておけばよい。20はローソクの横幅。
&chxt=x,y,r,x
&chxl=
0:||1|2|3|4|5|8|9|10|12|| ←下に出す文字列
1:|30.0|40.00| ←左上下に出す文字列
2:|30.0|40.00| ←右上下に出す文字列
3:|||Feb|| ←下の下に出す文字列
“Google Chart API で株価チャートを描く” に対して1件のコメントがあります。