summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-06-07 21:00:10 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-06-07 21:00:10 +1000
commitf812bdc3766df7e13c55601daabe51e6d363dbd6 (patch)
treebb39dceffc4e74ae71870edd64c34b503beaa8be /templates
parent4312dd5de6155554ff3138d7c194b7cad91303e6 (diff)
better graphing
Diffstat (limited to 'templates')
-rw-r--r--templates/themes/rrdtool/theme.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/templates/themes/rrdtool/theme.php b/templates/themes/rrdtool/theme.php
index 28ae8357..20c68c8e 100644
--- a/templates/themes/rrdtool/theme.php
+++ b/templates/themes/rrdtool/theme.php
@@ -18,7 +18,7 @@
global $config, $_theme;
$this->boards = explode(' ', $settings['boards']);
- $this->spans = Array('hour', 'day', 'week', 'month');
+ $this->spans = Array('minute', 'hour', 'day', 'week', 'month');
$this->interval = 60;
$this->height = 150;
$this->width = 700;
@@ -61,19 +61,23 @@
// Graph graph
if(!rrd_graph($settings['images'] . '/' . $board . '-' . $span . '.png', Array(
'-s -1' . $span,
- '-t Posts on ' . sprintf($config['board_abbreviation'], $board),
+ '-t Posts on ' . sprintf($config['board_abbreviation'] . ' this ' . $span, $board),
//'--lazy',
'-l 0',
'-h', $this->height, '-w', $this->width,
- '-l 0',
'-a', 'PNG',
+ '-R', 'mono',
'-W', 'Powered by Tinyboard',
+ '-E',
+ '-X', '0',
+ //'-L', '4',
+ '-Y',
'-v posts/minute',
'DEF:posts=' . $file . ':posts:AVERAGE',
- 'LINE2:posts#336600:Posts',
- 'GPRINT:posts:MAX: Max\\: %5.1lf %s',
- 'GPRINT:posts:AVERAGE: Avg\\: %5.1lf %s',
- 'GPRINT:posts:LAST: Current\\: %5.1lf %sposts/min',
+ 'LINE2:posts#663300:Posts',
+ 'GPRINT:posts:MAX:Max\\: %5.2lf',
+ 'GPRINT:posts:AVERAGE:Average\\: %5.2lf',
+ 'GPRINT:posts:LAST:Current\\: %5.2lf posts/min',
'HRULE:0#000000')))
error('RRDtool failed: ' . htmlentities(rrd_error()));
}