From 9ad6763c86fd8f28aad9c74b3fa6a4345fc90468 Mon Sep 17 00:00:00 2001 From: Louis Bailleul Date: Fri, 20 Nov 2015 14:39:19 +0000 Subject: [PATCH] Make graph page use session variable to compute graph size --- html/pages/graphs.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/html/pages/graphs.inc.php b/html/pages/graphs.inc.php index 6385ea969..c844fa0d6 100644 --- a/html/pages/graphs.inc.php +++ b/html/pages/graphs.inc.php @@ -111,6 +111,14 @@ else { $graph_array['height'] = "300"; $graph_array['width'] = $graph_width; + if($_SESSION['screen_width']) { + $graph_array['width'] = ($_SESSION['screen_width'] - ($_SESSION['screen_width']/12)); + } + + if($_SESSION['screen_height']) { + $graph_array['height'] = ($_SESSION['screen_height'] - ($_SESSION['screen_height']/2)); + } + echo("
"); include_once 'includes/print-date-selector.inc.php';