Merge branch 'MDL-43079-master-v2' of https://github.com/jamiepratt/moodle
This commit is contained in:
@@ -146,6 +146,12 @@ foreach ($fieldstoplot as $fieldtoplot => $notused) {
|
||||
$gridresolution = 10;
|
||||
$max = ceil($max / $gridresolution) * $gridresolution;
|
||||
$min = floor($min / $gridresolution) * $gridresolution;
|
||||
|
||||
if ($max == $min) {
|
||||
// Make sure there is some difference between min and max y values.
|
||||
$max = $min + $gridresolution;
|
||||
}
|
||||
|
||||
$gridlines = ceil(($max - $min) / $gridresolution) + 1;
|
||||
|
||||
$graph->parameter['y_axis_gridlines'] = $gridlines;
|
||||
|
||||
Reference in New Issue
Block a user