<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {'packages':['timeline']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var container = document.getElementById('timeline');
var chart = new google.visualization.Timeline(container);
var dataTable = new google.visualization.DataTable();
dataTable.addColumn({ type: 'string', id: 'President' });
dataTable.addColumn({ type: 'date', id: 'Start' });
dataTable.addColumn({ type: 'date', id: 'End' });
dataTable.addRows([
[ '猫', new Date(1789, 3, 30), new Date(1797, 2, 4) ],
[ '犬', new Date(1797, 2, 4), new Date(1801, 2, 4) ],
[ 'おわ', new Date(1801, 2, 4), new Date(1809, 2, 4) ],
[ 'おわ', new Date(1812, 2, 4), new Date(1813, 2, 4) ]
]);
chart.draw(dataTable);
}
</script>
</head>
<body>
<div id="timeline" style="height: 180px;"></div>
</body>
</html>
最終更新:2016年08月26日 13:23