Skip to content
Snippets Groups Projects
Commit 31f10314 authored by Stephen Farry's avatar Stephen Farry
Browse files

updates to index and chart display

parent f8a0e21d
Branches
No related merge requests found
......@@ -28,6 +28,10 @@ function setChartXaxisRange(min,max){
}
var fillGauges = new Boolean(document.getElementById("example_gauge"));
function init_results(){
$.getJSON({
url: '/last_N_data',
......@@ -94,10 +98,11 @@ function requestChartVar() {
$.ajax({
url: '/live-data',
success: function(point) {
fio_reading = (point["pressure_buffer"]).toFixed(0) ;
//console.log(fio_reading);
fio_gauge.data.datasets[0].gaugeData['value'] = fio_reading;
if(fillGauges == true){
fio_reading = (point["pressure_buffer"]).toFixed(0) ;
//console.log(fio_reading);
fio_gauge.data.datasets[0].gaugeData['value'] = fio_reading;
}
var seconds = point["timestamp"]/1000;
// get difference between last time stamp and this and apply to existing points
var diff = 0;
......@@ -134,7 +139,7 @@ function requestChartVar() {
chart_pressure.update();
chart_flow.update();
chart_volume.update();
fio_gauge.update();
if (fillGauges == true) fio_gauge.update();
},
cache: false
......@@ -373,7 +378,7 @@ $(document).ready(function() {
});
});
if (fillGauges == true){
var ctx = document.getElementById("example_gauge").getContext("2d");
fio_gauge = new Chart(ctx, {
type: "tsgauge",
......@@ -392,4 +397,5 @@ fio_gauge = new Chart(ctx, {
events: []
}
});
}
......@@ -45,7 +45,7 @@
</div>
<!--<div class="small ml-auto mr-auto">PC-A/C</div>-->
<div class="card-body px-1 py-1">
<div class = "select-container">
<div class = "select-container" disabled>
<select class = "input-reading ml-auto mr-auto input-editable pickout" name="VentilatorMode" id="vent_mode" pickouttitle="Select Ventilator Mode" width="10%">
<option value = ""></option>
<optgroup label = "Pressure Control Modes">
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment