-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
|
||
<?php require($_SERVER['DOCUMENT_ROOT'] . '/assets/php/getTemp.php' );?> | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="../assets/css/bootstrap.css" media="screen"> | ||
<link rel="stylesheet" href="../assets/css/main.css"> | ||
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | ||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | ||
<script type="text/javascript"> | ||
|
||
var jsonData = <?php echo json_encode($table); ?>; | ||
|
||
// Load the Visualization API and the piechart package. | ||
google.load('visualization', '1', {'packages':['corechart']}); | ||
|
||
// Set a callback to run when the Google Visualization API is loaded. | ||
google.setOnLoadCallback(drawChart); | ||
|
||
function drawChart() { | ||
|
||
// Create our data table out of JSON data loaded from server. | ||
var data = new google.visualization.DataTable(jsonData); | ||
var options = { | ||
curveType: 'function', | ||
'height':500 | ||
}; | ||
// Instantiate and draw our chart, passing in some options. | ||
// Do not forget to check your div ID | ||
var chart = new google.visualization.LineChart(document.getElementById('curve_chart')); | ||
chart.draw(data, options); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
|
||
|
||
<div class="container"> | ||
<div class="page-header"> | ||
<div class="row"> | ||
<div class="col-lg-6"> | ||
</div> | ||
</div> | ||
<div class="col-lg-6"> | ||
</div> | ||
</div> | ||
|
||
<div class="main" id="content"> | ||
<div class="col-lg-4"> | ||
</div> | ||
<div class="col-lg-4"> | ||
<h3 style="text-align:center">Letzte Messung</h3> | ||
<table class="table table-striped table-hover"> | ||
<tr class=""> | ||
<th>Datum</th> | ||
<th>Volumen</th> | ||
</tr> | ||
<?php while( $row = $result2->fetch(PDO::FETCH_ASSOC) ) { ?> | ||
<tr class=""> | ||
<td><?php echo $row['Datum']; ?></td> | ||
<td><?php echo $row['Volumen']; ?></td> | ||
</tr> | ||
<?php } ?> | ||
</table> | ||
</div> | ||
<div class="col-lg-4"> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="container"> | ||
<div id="curve_chart" style="width:100%"></div> | ||
</div> | ||
|
||
<div class="container"> | ||
</div> | ||
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script> | ||
</body> | ||
</html> |