Commits

imelnikov  committed 26dc018 Draft

Change chart styles, fix dates

  • Participants
  • Parent commits c221e27

Comments (0)

Files changed (2)

         dataTable.addColumn('number', 'В сети');
         dataTable.addRows([
           {% for status in statuses %}
-          [new Date('{{ status.time }}'), {{ status.online }}],
+          [new Date({{ status.timestamp }}), {{ status.online }}],
           {% endfor %}
         ]);
 
 
         var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
         var options = {
-          //width: 400, height: 240,
+          width: 1100, height: 500,
           legend: 'none',
-          pointSize: 5,
+          //pointSize: 5,
           title: 'Title online'
         };
         chart.draw(dataView, options);
 <body>
 
 	<h1>online status</h1>
-	<div id="chart_div" style="width: 900px; height: 500px;"></div>
+	<div id="chart_div" style="width: 1100px; height: 500px;"></div>
 
 </body>
 </html>
 			.filter('user_id', user_id)\
 			.filter('time > ', time)\
 			.order('time')
+		
+		for status in statuses:
+			status.timestamp = int(status.time.strftime('%s'))*1000
 
 		template_values = {
 			'user_id': user_id,