diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-31 15:21:15 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-12-31 15:21:15 -0500 |
commit | 62dd398cb0388a0aa178043ff321ac736418d7d4 (patch) | |
tree | b8046d4949470ee17ed020f04a1299d7d84ca5c3 | |
parent | d732d35cd516d8023a1b174d8d6e71c5072df399 (diff) | |
download | phoronix-test-suite-upstream-62dd398cb0388a0aa178043ff321ac736418d7d4.tar.gz phoronix-test-suite-upstream-62dd398cb0388a0aa178043ff321ac736418d7d4.tar.xz phoronix-test-suite-upstream-62dd398cb0388a0aa178043ff321ac736418d7d4.zip |
pts_Graph: Show lower-value results better
-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; |