mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-27 07:30:08 -05:00
fixed issue with timeline history!
This commit is contained in:
58
Admin/webfront/graph.html
Normal file
58
Admin/webfront/graph.html
Normal file
@ -0,0 +1,58 @@
|
||||
<script type="text/javascript" src="//www.google.com/jsapi"></script>
|
||||
<script>
|
||||
|
||||
google.load('visualization', '1', { callback: drawChart, packages: ['corechart'] });
|
||||
google.setOnLoadCallback(drawChart);
|
||||
|
||||
function drawChart() {
|
||||
|
||||
var data = new google.visualization.DataTable();
|
||||
data.addColumn('datetime', 'Time');
|
||||
data.addColumn('number', 'Players');
|
||||
|
||||
data.addRows(players);
|
||||
|
||||
var options = {
|
||||
//curveType: 'function',
|
||||
//width: 900,
|
||||
height: 300,
|
||||
legend: {position: 'none'},
|
||||
enableInteractivity: true,
|
||||
chartArea: {
|
||||
width: '93%'
|
||||
},
|
||||
vAxis: {
|
||||
title: 'Players',
|
||||
gridlines: { count: 7 },
|
||||
viewWindowMode: 'explicit',
|
||||
viewWindow: {
|
||||
min: 0,
|
||||
max: 18
|
||||
},
|
||||
},
|
||||
hAxis: {
|
||||
viewWindow: {
|
||||
//min: players[0][0],
|
||||
//max: players[players.length-1][0]
|
||||
},
|
||||
gridlines: {
|
||||
count: 12,
|
||||
units: {
|
||||
days: {format: ["MMM dd"]},
|
||||
hours: {format: ["HH:mm", "ha"]},
|
||||
}
|
||||
},
|
||||
minorGridlines: {
|
||||
count: 5,
|
||||
units: {
|
||||
hours: {format: ["hh:mm:ss a", "ha"]},
|
||||
minutes: {format: ["HH:mm a Z", ":mm"]}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
|
||||
chart.draw(data, options);
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user