From 240c4cf7a19ec7e87bbbd0bfc651cabdae374f4e Mon Sep 17 00:00:00 2001 From: Brian Flowers Date: Sun, 6 Nov 2016 16:47:05 -0500 Subject: [PATCH] Updating graph styles --- TODO | 3 ++- graph.php | 3 ++- styles.css | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index 4834be2..315c63b 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,4 @@ TODO - Add timings to graphs - - Add charts of other info \ No newline at end of file + - Add charts of other info + - Add alerts \ No newline at end of file diff --git a/graph.php b/graph.php index 89af683..ef1e861 100644 --- a/graph.php +++ b/graph.php @@ -73,6 +73,7 @@ if( !in_array($host, $hosts) ) $attributes[$attribute['attribute']] = $attribute['name']; } $i = 0; + foreach (array_keys($attributes) as $attribute) { $query = "SELECT printf('%d', timestamp) AS timestamp,value ". @@ -93,7 +94,7 @@ if( !in_array($host, $hosts) ) echo " context.stroke();\n"; $name = $attributes[$attribute]; - echo " context.strokeText('$name', 300, ".(395-15*$i).");"; + echo " context.strokeText('$name', ".(40*$i).", 415);"; $i+=1; } ?> diff --git a/styles.css b/styles.css index f63e243..13e3181 100644 --- a/styles.css +++ b/styles.css @@ -72,7 +72,7 @@ th .graph { - width: 410px; - height: 410px; + width: 435px; + height: 500px; overflow: visible; } \ No newline at end of file -- 1.8.3.1