better graphing
This commit is contained in:
parent
4312dd5de6
commit
f812bdc376
@ -18,7 +18,7 @@
|
|||||||
global $config, $_theme;
|
global $config, $_theme;
|
||||||
|
|
||||||
$this->boards = explode(' ', $settings['boards']);
|
$this->boards = explode(' ', $settings['boards']);
|
||||||
$this->spans = Array('hour', 'day', 'week', 'month');
|
$this->spans = Array('minute', 'hour', 'day', 'week', 'month');
|
||||||
$this->interval = 60;
|
$this->interval = 60;
|
||||||
$this->height = 150;
|
$this->height = 150;
|
||||||
$this->width = 700;
|
$this->width = 700;
|
||||||
@ -61,19 +61,23 @@
|
|||||||
// Graph graph
|
// Graph graph
|
||||||
if(!rrd_graph($settings['images'] . '/' . $board . '-' . $span . '.png', Array(
|
if(!rrd_graph($settings['images'] . '/' . $board . '-' . $span . '.png', Array(
|
||||||
'-s -1' . $span,
|
'-s -1' . $span,
|
||||||
'-t Posts on ' . sprintf($config['board_abbreviation'], $board),
|
'-t Posts on ' . sprintf($config['board_abbreviation'] . ' this ' . $span, $board),
|
||||||
//'--lazy',
|
//'--lazy',
|
||||||
'-l 0',
|
'-l 0',
|
||||||
'-h', $this->height, '-w', $this->width,
|
'-h', $this->height, '-w', $this->width,
|
||||||
'-l 0',
|
|
||||||
'-a', 'PNG',
|
'-a', 'PNG',
|
||||||
|
'-R', 'mono',
|
||||||
'-W', 'Powered by Tinyboard',
|
'-W', 'Powered by Tinyboard',
|
||||||
|
'-E',
|
||||||
|
'-X', '0',
|
||||||
|
//'-L', '4',
|
||||||
|
'-Y',
|
||||||
'-v posts/minute',
|
'-v posts/minute',
|
||||||
'DEF:posts=' . $file . ':posts:AVERAGE',
|
'DEF:posts=' . $file . ':posts:AVERAGE',
|
||||||
'LINE2:posts#336600:Posts',
|
'LINE2:posts#663300:Posts',
|
||||||
'GPRINT:posts:MAX: Max\\: %5.1lf %s',
|
'GPRINT:posts:MAX:Max\\: %5.2lf',
|
||||||
'GPRINT:posts:AVERAGE: Avg\\: %5.1lf %s',
|
'GPRINT:posts:AVERAGE:Average\\: %5.2lf',
|
||||||
'GPRINT:posts:LAST: Current\\: %5.1lf %sposts/min',
|
'GPRINT:posts:LAST:Current\\: %5.2lf posts/min',
|
||||||
'HRULE:0#000000')))
|
'HRULE:0#000000')))
|
||||||
error('RRDtool failed: ' . htmlentities(rrd_error()));
|
error('RRDtool failed: ' . htmlentities(rrd_error()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user