Category: グラフの合成 折れ線グラフ(Line) と 棒グラフ(Bar) 「実験」

iPhone(iPad)とアンドロイドとWindows Phone etc ( 2013 と 2014) 比較 =折れ線と棒グラフ=
/////

///// 
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(
function () {
var data = google.visualization.arrayToDataTable([
['月', 'iPhone(iPad)', 'Android', 'Windows Phone etc','平均'],
['2013/09', 45.0, 50.0, 5,33.33],
['2014/09', 57.5,42.2, 0.3, 33.33]
]);
var ac = new google.visualization.ComboChart(document.getElementById('gct_sample_combo001ss')); ac.draw(data, {
title : 'スマートホンのシェア',
vAxis: {title: "%"},
hAxis: {title: "月"},
seriesType: "bars",
series: {5: {type: "line"}}
});
} );
</script>
<div  style="width:100%; height:250pt" id="gct_sample_combo001ss"></div>
/////

///// 
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(
function ()
{ var data = google.visualization.arrayToDataTable([
['月', 'iPhone(iPad)', 'Android', 'Windows Phone etc','平均'],
['2013/09', 45.0, 50.0, 5,33.33],
['2014/09', 57.5,42.2, 0.3, 50.0]
]);
var ac = new google.visualization.ComboChart(document.getElementById('gct_sample_combo002ss')); ac.draw(data, {
title : 'スマートホンのシェア', vAxis: {title: "%"},
hAxis: {title: "月"},
seriesType: "bars",
series: {3: {type: "line"}}
});
} );
</script>
<div  style="width:100%; height:250pt" id="gct_sample_combo002ss"></div>
///// 

グラフの合成  折れ線グラフ(Line) と 棒グラフ(Bar) 「実験」

/////


///// 
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(
function () {
var data = google.visualization.arrayToDataTable([
['月', 'ボリビア', 'エクアドル', 'マダガスカル', 'パプアニューギニア', 'ルワンダ', '平均'],
['2004/05', 165, 938, 522, 998, 450, 614.6 ],
['2005/06', 135, 1120, 599, 1268, 288, 682 ],
['2006/07', 157, 1167, 587, 807, 397, 623 ],
['2007/08', 139, 1110, 615, 968, 215, 609.4 ],
['2008/09', 136, 691, 629, 1026, 366, 569.6 ] ]);
var ac = new google.visualization.ComboChart(document.getElementById('gct_sample_combo')); ac.draw(data, {
title : '国別のコーヒー月間生産量',
vAxis: {title: "カップ数"},
hAxis: {title: "月"},
seriesType: "bars", // 全体は棒グラフ(default='line')
series: {5: {type: "line"}} // 平均だけ折れ線グラフ });
} );
</script>
<div id="gct_sample_combo" style="width:100%; height:250pt" ></div>
/////
 

↑このページのトップヘ