Thermometers styling

Sun, 23 Jul 2017 12:12:58 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 23 Jul 2017 12:12:58 +0200
changeset 523
eca3813c21ee
parent 522
4d9ed666431d
child 524
bd1ea64ae484

Thermometers styling

www-thermferm/liveview.php file | annotate | diff | comparison | revisions
--- a/www-thermferm/liveview.php	Sat Jul 22 23:34:50 2017 +0200
+++ b/www-thermferm/liveview.php	Sun Jul 23 12:12:58 2017 +0200
@@ -149,17 +149,17 @@
 	}
 
 	if ("$chiller_state" == "OK") {
-	    $outstr .= '       $(\'#gaugeContainer_chiller'.$unr.'\').jqxLinearGauge({'.PHP_EOL;
-	    $outstr .= '         min: -20, max: 25, width: 100, height: 275,'.PHP_EOL;
-	    $outstr .= '         ranges: [{ startValue: -20, endValue:  0, style: { fill: \'#3399FF\', stroke: \'#3399FF\' }},'.PHP_EOL;
-	    $outstr .= '                  { startValue:   1, endValue: 25, style: { fill: \'#FC6A6A\', stroke: \'#FC6A6A\' }}],'.PHP_EOL;
+	    $outstr .= '       $(\'#gaugeContainer_chiller'.$unr.'\').jqxGauge({'.PHP_EOL;
+	    $outstr .= '         min: -20, max: 25, width: 150, height: 150,'.PHP_EOL;
+	    $outstr .= '         ranges: [{ startValue: -20, endValue:  0, startWidth: 5, endWidth: 5, style: { fill: \'#3399FF\', stroke: \'#3399FF\' }},'.PHP_EOL;
+	    $outstr .= '                  { startValue:   0, endValue: 25, startWidth: 5, endWidth: 5, style: { fill: \'#FC6A6A\', stroke: \'#FC6A6A\' }}],'.PHP_EOL;
 	    $outstr .= '         ticksMinor: { interval: 1, size: \'5%\' },'.PHP_EOL;
 	    $outstr .= '         ticksMajor: { interval: 5, size: \'9%\' },'.PHP_EOL;
-	    $outstr .= '         labels: { interval: 5, position: \'far\' },'.PHP_EOL;
+	    $outstr .= '         labels: { interval: 5 },'.PHP_EOL;
 	    $outstr .= '         value: '.$chiller_temperature.','.PHP_EOL;
-	    $outstr .= '         ticksPosition: \'far\','.PHP_EOL;
-	    $outstr .= '         colorScheme: \'scheme04\','.PHP_EOL;
-	    $outstr .= '         animationDuration: 1200'.PHP_EOL;
+	    $outstr .= '         colorScheme: \'scheme05\','.PHP_EOL;
+	    $outstr .= '         animationDuration: 5000,'.PHP_EOL;
+	    $outstr .= '         caption: { value: \'Chiller\', position: \'bottom\', offset: [0, 10] }'.PHP_EOL;
 	    $outstr .= '       });'.PHP_EOL;
 	}
 
@@ -210,14 +210,15 @@
 
 	$outstr .= '    <div id="fermentor">'.PHP_EOL;
 	$outstr .= '     <div id="fermentor_thermometers">'.PHP_EOL;
-	if ("$air_state" == "OK") {
+	if (("$air_state" == "OK") && ("$beer_state" == "OK") && ("$chiller_state" == "OK")) {
 	    $outstr .= '       <div id="gaugeContainer_air'.$unr.'" style="float: left; margin-top: 10px; margin-left: 10px;"></div>'.PHP_EOL;
-	}
-	if ("$beer_state" == "OK") {
-	    $outstr .= '       <div id="gaugeContainer_beer'.$unr.'" style="float: left; margin-top: 10px; margin-left: 10px;"></div>'.PHP_EOL;
-	}
-	if ("$chiller_state" == "OK") {
-	    $outstr .= '       <div id="gaugeContainer_chiller'.$unr.'" style="float: left; margin-top: 10px; margin-left: 10px;"></div>'.PHP_EOL;
+	    $outstr .= '       <div id="gaugeContainer_beer'.$unr.'" style="float: right; margin-top: 10px; margin-right: 10px;"></div>'.PHP_EOL;
+	    $outstr .= '       <div id="gaugeContainer_chiller'.$unr.'" style="float: left; margin-top: 200px;"></div>'.PHP_EOL;
+	} else if (("$air_state" == "OK") && ("$beer_state" == "OK")) {
+	    $outstr .= '       <div id="gaugeContainer_air'.$unr.'" style="float: left; margin-top: 48px; margin-left: 48px;"></div>'.PHP_EOL;
+	    $outstr .= '       <div id="gaugeContainer_beer'.$unr.'" style="float: right; margin-top: 48px; margin-right: 48px;"></div>'.PHP_EOL;
+	} else if ("$air_state" == "OK") {
+	    $outstr .= '       <div id="gaugeContainer_air'.$unr.'" style="margin-top: 48px; margin-left: 222px;"></div>'.PHP_EOL;
 	}
 	$outstr .= '     </div>'.PHP_EOL;
 

mercurial