diff options
Diffstat (limited to 'pts-core/objects')
-rw-r--r-- | pts-core/objects/pts_Graph/pts_Graph.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pts-core/objects/pts_Graph/pts_Graph.php b/pts-core/objects/pts_Graph/pts_Graph.php index b69b942..4e157ed 100644 --- a/pts-core/objects/pts_Graph/pts_Graph.php +++ b/pts-core/objects/pts_Graph/pts_Graph.php @@ -310,7 +310,7 @@ abstract class pts_Graph } protected function maximum_graph_value() { - $maximum = $this->graph_attr_marks; + $maximum = 0; foreach($this->graph_data as $graph_set) { @@ -329,6 +329,10 @@ abstract class pts_Graph { $maximum = (ceil(100 / $this->graph_attr_marks) + 1) * $this->graph_attr_marks; } + else if($maximum < $this->graph_attr_marks) + { + $maximum = $maximum * 1.35; + } else { $maximum = (floor(round($maximum * 1.35) / $this->graph_attr_marks) + 1) * $this->graph_attr_marks; |