Sun, 15 Jul 2018 14:08:19 +0200
Style fixes for the log chart. Removed png export button that doesn't work anymore.
www-thermferm/archives.php | file | annotate | diff | comparison | revisions |
--- a/www-thermferm/archives.php Sun Jul 15 12:05:16 2018 +0200 +++ b/www-thermferm/archives.php Sun Jul 15 14:08:19 2018 +0200 @@ -1,11 +1,11 @@ <?php -/***************************************************************************** +/** + * @file archives.php + * @brief Display as chart or download a fermentation logfile. + * @author Michiel Broek <mbroek at mbse dot eu> + * * Copyright (C) 2015-2018 * - * Michiel Broek <mbroek at mbse dot eu> - * - * This file is part of ThermFerm - * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2, or (at your option) any @@ -19,7 +19,8 @@ * You should have received a copy of the GNU General Public License * along with ThermFerm; see the file COPYING. If not, write to the Free * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - *****************************************************************************/ + */ + require_once('utilities.php'); $my_style = 'ui-redmond'; @@ -174,8 +175,8 @@ $outstr .= ' description: "Heat/Cool %"'.PHP_EOL; $outstr .= ' },'.PHP_EOL; $outstr .= ' series: ['.PHP_EOL; - $outstr .= ' { dataField: "CoolUse", lineWidth: 1, displayText: "Cool %", opacity: 0.5 },'.PHP_EOL; - $outstr .= ' { dataField: "HeatUse", lineWidth: 1, displayText: "Heat %", opacity: 0.5 }'.PHP_EOL; + $outstr .= ' { dataField: "CoolUse", lineWidth: 1, displayText: "Cool %", opacity: 0.2 },'.PHP_EOL; + $outstr .= ' { dataField: "HeatUse", lineWidth: 1, displayText: "Heat %", opacity: 0.2 }'.PHP_EOL; $outstr .= ' ]'.PHP_EOL; $outstr .= ' },'.PHP_EOL; $outstr .= ' {'.PHP_EOL; @@ -191,7 +192,7 @@ $outstr .= ' { dataField: "Target_lo", lineWidth: 1, displayText: "Target Lo", opacity: 0.7 },'.PHP_EOL; $outstr .= ' { dataField: "Target_hi", lineWidth: 1, displayText: "Target Hi", opacity: 0.7 },'.PHP_EOL; $outstr .= ' { dataField: "Room", lineWidth: 1, displayText: "Room", opacity: 0.5 },'.PHP_EOL; - $outstr .= ' { dataField: "Chiller", lineWidth: 1, displayText: "Chiller", opacity: 0.4 }'.PHP_EOL; + $outstr .= ' { dataField: "Chiller", lineWidth: 1, displayText: "Chiller", color: \'#0000bb\' }'.PHP_EOL; $outstr .= ' ]'.PHP_EOL; $outstr .= ' }]'.PHP_EOL; $outstr .= ' };'.PHP_EOL; @@ -216,13 +217,9 @@ $outstr .= ' });'.PHP_EOL; $outstr .= ' $("#print").jqxButton({ width: 100, height: 25, theme: "ui-redmond" });'.PHP_EOL; - $outstr .= ' $("#pngButton").click(function () {'.PHP_EOL; - $outstr .= ' $("#fermentor_chart").jqxChart("saveAsPNG", "Chart_'.$name.'.png", getExportServer());'.PHP_EOL; - $outstr .= ' });'.PHP_EOL; $outstr .= ' $("#pdfButton").click(function () {'.PHP_EOL; $outstr .= ' $("#fermentor_chart").jqxChart("saveAsPDF", "Chart_'.$name.'.pdf", getExportServer());'.PHP_EOL; $outstr .= ' });'.PHP_EOL; - $outstr .= ' $("#pngButton").jqxButton({ width: 100, height: 25, theme: "ui-redmond" });'.PHP_EOL; $outstr .= ' $("#pdfButton").jqxButton({ width: 100, height: 25, theme: "ui-redmond" });'.PHP_EOL; $outstr .= ' });'.PHP_EOL; @@ -231,7 +228,6 @@ $outstr .= ' <div id="fermentor_chart" style="width:850px; height:410px; float:left"></div>'.PHP_EOL; $outstr .= ' <div style="margin-top: 2px; margin-left: 10px;">'.PHP_EOL; $outstr .= ' <input style="float: left; margin-left: 10px;" id="print" type="button" value="Print Graph" />'.PHP_EOL; - $outstr .= ' <input style="float: left; margin-left: 10px; margin-top: 10px;" id="pngButton" type="button" value="Save as PNG" />'.PHP_EOL; $outstr .= ' <input style="float: left; margin-left: 10px; margin-top: 10px;" id="pdfButton" type="button" value="Save as PDF" />'.PHP_EOL; $outstr .= ' </div>'.PHP_EOL; $outstr .= ' </div> <!-- fermentor -->'.PHP_EOL;