summaryrefslogtreecommitdiffstats
path: root/pts-core
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-31 10:57:45 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-31 10:57:45 -0500
commit43dd8d436139ddd1d2711a63465a3f39e85ac8fa (patch)
tree4ed779dab879b5f822894a8a328aeed435d2ed5c /pts-core
parentcdde0a752766707928750b7accc9b7ed15388535 (diff)
downloadphoronix-test-suite-upstream-43dd8d436139ddd1d2711a63465a3f39e85ac8fa.tar.gz
phoronix-test-suite-upstream-43dd8d436139ddd1d2711a63465a3f39e85ac8fa.tar.xz
phoronix-test-suite-upstream-43dd8d436139ddd1d2711a63465a3f39e85ac8fa.zip
pts_Graph: When rendering a graph on a percent basis, format scale for
100-point basis
Diffstat (limited to 'pts-core')
-rw-r--r--pts-core/objects/pts_Graph/pts_Graph.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/pts-core/objects/pts_Graph/pts_Graph.php b/pts-core/objects/pts_Graph/pts_Graph.php
index 2e23710..b62b63a 100644
--- a/pts-core/objects/pts_Graph/pts_Graph.php
+++ b/pts-core/objects/pts_Graph/pts_Graph.php
@@ -324,7 +324,14 @@ abstract class pts_Graph
if(is_numeric($maximum))
{
- $maximum = (floor(round($maximum * 1.35) / $this->graph_attr_marks) + 1) * $this->graph_attr_marks;
+ if($maximum <= 100 && $this->graph_y_title == "Percent")
+ {
+ $maximum = (ceil(100 / $this->graph_attr_marks) + 1) * $this->graph_attr_marks;
+ }
+ else
+ {
+ $maximum = (floor(round($maximum * 1.35) / $this->graph_attr_marks) + 1) * $this->graph_attr_marks;
+ }
}
return $maximum;