added chart to visualize Gamma scores

master
melvin 2013-04-15 17:17:27 +08:00
parent b94a2e5514
commit 5ed259d560
1 changed files with 55 additions and 0 deletions

55
exp/chart.html Normal file
View File

@ -0,0 +1,55 @@
<html>
<head>
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {
// Create the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'AI');
data.addColumn('number', 'Gamma');
data.addRows([
["MCTS-C-8",2.61172],
["MCTS-H-8",1.45508],
["MMAB-C-8",1.38136],
["MMAB-C-1",1.16726],
["MCTS-C-1",1.12943],
["VEGAS-H-1",0.974163],
["VEGAS-C-1",0.872949],
["VEGAS-C-8",0.862261],
["VEGAS-H-8",0.803905],
["MMAB-H-1",0.779177],
["MMAB-H-8",0.732664],
["MCTS-H-1",0.441244],
]);
// Set chart options
var options = {
'title':'Gamma ratings',
//'width':800,
'height':600
};
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.BarChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
</body>
</html>