Commit ce5e431b authored by moodler's avatar moodler
Browse files

$CFG->preferlinegraphs will make graphs use lines instead of bars

parent 4cde0f8a
......@@ -203,6 +203,9 @@ $CFG->admin = 'admin';
// This setting will cause the userdate() function not to fix %d in
// date strings, and just let them show with a zero prefix.
// $CFG->nofixday = true;
//
// This setting will make some graphs (eg user logs) use lines instead of bars
// $CFG->preferlinegraphs = true;
//=========================================================================
// ALL DONE! To continue installation, visit your main page with a browser
......
......@@ -95,14 +95,19 @@
$graph->y_data['logs'] = $logs;
$graph->y_order = array('logs');
$graph->y_format['logs'] = array('colour' => 'blue','bar' => 'fill','bar_size' => 0.6);
if (!empty($CFG->preferlinegraphs)) {
$graph->y_format['logs'] = array('colour' => 'blue','line' => 'line');
} else {
$graph->y_format['logs'] = array('colour' => 'blue','bar' => 'fill','bar_size' => 0.6);
$graph->parameter['bar_spacing'] = 0;
}
$graph->parameter['y_label_left'] = get_string("hits");
$graph->parameter['label_size'] = "12";
$graph->parameter['x_axis_angle'] = 90;
$graph->parameter['x_label_angle'] = 0;
$graph->parameter['bar_spacing'] = 0;
$graph->parameter['tick_length'] = 0;
......@@ -152,15 +157,18 @@
$graph->y_data['logs'] = $logs;
$graph->y_order = array('logs');
$graph->y_format['logs'] = array('colour' => 'blue','bar' => 'fill','bar_size' => 0.9);
if (!empty($CFG->preferlinegraphs)) {
$graph->y_format['logs'] = array('colour' => 'blue','line' => 'line');
} else {
$graph->y_format['logs'] = array('colour' => 'blue','bar' => 'fill','bar_size' => 0.9);
}
$graph->parameter['y_label_left'] = get_string("hits");
$graph->parameter['label_size'] = "12";
$graph->parameter['x_axis_angle'] = 0;
$graph->parameter['x_label_angle'] = 0;
$graph->parameter['shadow'] = 'none';
error_reporting(5); // ignore most warnings such as font problems etc
......
Supports Markdown
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