Source

vk-online / index.html

Full commit
<html>
<head>
	<title>Online status</title>
	
	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {

        var dataTable = new google.visualization.DataTable();
        dataTable.addColumn('datetime', 'Дата');
        dataTable.addColumn('number', 'В сети');
        dataTable.addRows([
          {% for status in statuses %}
          [new Date({{ status.timestamp }}), {{ status.online }}],
          {% endfor %}
        ]);

        var dataView = new google.visualization.DataView(dataTable);
        dataView.setColumns([{calc: function(data, row) { return data.getFormattedValue(row, 0); }, type:'string'}, 1]);

        var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
        var options = {
          width: 1100, height: 500,
          legend: 'none',
          //pointSize: 5,
          title: 'Title online'
        };
        chart.draw(dataView, options);
      }
    </script>
</head>
<body>

<a href="/">По часам</a>
<a href="/minute">По минутам</a>

	<div id="chart_div" style="width: 1100px; height: 500px;"></div>

</body>
</html>