Commit 134d63d4 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Print date at the bottom of graphs on stats pages


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 3b3592bd
......@@ -42,6 +42,7 @@ $string['strftimerecentfull'] = '%%a, %%d %%b %%Y, %%l:%%M %%p';
$string['strftimetime'] = '%%l:%%M %%p';
$string['strfdaymonthyearshort'] = '%%d/%%m/%%Y';
$string['strftimew3cdatetime'] = '%%Y-%%m-%%dT%%T%%z';
$string['strftimew3cdate'] = '%%Y-%%m-%%d';
$string['thislanguage'] = 'English';
......
......@@ -482,12 +482,21 @@ function user_institution_graph() {
$Graph->add(
Image_Graph::vertical(
Image_Graph::factory('title', array(get_string('institutionmembers', 'admin'), 9)),
$Plotarea = Image_Graph::factory('plotarea'),
5
Image_Graph::vertical(
Image_Graph::factory('title', array(get_string('institutionmembers', 'admin'), 9)),
$Plotarea = Image_Graph::factory('plotarea'),
5
),
$Date = Image_Graph::factory('title', array(format_date(time(), 'strftimew3cdate'), 7)),
96
)
);
$Date->setAlignment(IMAGE_GRAPH_ALIGN_RIGHT);
$DateFont =& $Graph->addNew('font', 'Vera');
$DateFont->setColor('gray@0.8');
$Date->setFont($DateFont);
$Dataset =& Image_Graph::factory('dataset', array($dataarray));
$Plot =& $Plotarea->addNew('bar', array(&$Dataset));
$Plot->setLineColor('gray');
......@@ -643,13 +652,22 @@ function group_type_graph() {
$Graph->setFont($Font);
$Graph->add(
Image_Graph::horizontal(
$Plotarea = Image_Graph::factory('plotarea'),
$Legend = Image_Graph::factory('legend'),
60
Image_Graph::vertical(
Image_Graph::horizontal(
$Plotarea = Image_Graph::factory('plotarea'),
$Legend = Image_Graph::factory('legend'),
60
),
$Date = Image_Graph::factory('title', array(format_date(time(), 'strftimew3cdate'), 7)),
96
)
);
$Date->setAlignment(IMAGE_GRAPH_ALIGN_RIGHT);
$DateFont =& $Graph->addNew('font', 'Vera');
$DateFont->setColor('gray@0.8');
$Date->setFont($DateFont);
$Legend->setPlotArea($Plotarea);
$Legend->setFontSize(6);
$Plotarea->hideAxis();
......@@ -808,12 +826,21 @@ function view_type_graph() {
$Graph->add(
Image_Graph::vertical(
Image_Graph::factory('title', array(get_string('viewsbytype', 'admin'), 9)),
$Plotarea = Image_Graph::factory('plotarea'),
5
Image_Graph::vertical(
Image_Graph::factory('title', array(get_string('viewsbytype', 'admin'), 9)),
$Plotarea = Image_Graph::factory('plotarea'),
5
),
$Date = Image_Graph::factory('title', array(format_date(time(), 'strftimew3cdate'), 7)),
96
)
);
$Date->setAlignment(IMAGE_GRAPH_ALIGN_RIGHT);
$DateFont =& $Graph->addNew('font', 'Vera');
$DateFont->setColor('gray@0.8');
$Date->setFont($DateFont);
$Plotarea->hideAxis();
$Dataset =& Image_Graph::factory('dataset', array($dataarray));
$Plot =& $Plotarea->addNew('pie', array(&$Dataset));
......@@ -874,12 +901,21 @@ function graph_site_data_weekly() {
$Graph->add(
Image_Graph::vertical(
$Plotarea = Image_Graph::factory('plotarea'),
$Legend = Image_Graph::factory('legend'),
88
Image_Graph::vertical(
$Plotarea = Image_Graph::factory('plotarea'),
$Legend = Image_Graph::factory('legend'),
88
),
$Date = Image_Graph::factory('title', array(format_date(time(), 'strftimew3cdate'), 7)),
96
)
);
$Date->setAlignment(IMAGE_GRAPH_ALIGN_RIGHT);
$DateFont =& $Graph->addNew('font', 'Vera');
$DateFont->setColor('gray@0.8');
$Date->setFont($DateFont);
$Legend->setPlotarea($Plotarea);
$datasetinfo = array(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment