summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-04-25 16:12:50 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-04-25 16:12:50 -0400
commitccc7503a243aee5907b341b6d22fc253dd09609a (patch)
treec5ce92b1fbaaebc473fd9c6df0e64b226aa9f953
parent767af0ab54f4242a719201ee3984e1cfe9bdf787 (diff)
downloadphoronix-test-suite-upstream-ccc7503a243aee5907b341b6d22fc253dd09609a.tar.gz
phoronix-test-suite-upstream-ccc7503a243aee5907b341b6d22fc253dd09609a.tar.xz
phoronix-test-suite-upstream-ccc7503a243aee5907b341b6d22fc253dd09609a.zip
Fixes for pts_Graph
-rw-r--r--pts-core/objects/pts_BarGraph.php4
-rw-r--r--pts-core/objects/pts_Graph.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/pts-core/objects/pts_BarGraph.php b/pts-core/objects/pts_BarGraph.php
index a7d3182..4d9c4d3 100644
--- a/pts-core/objects/pts_BarGraph.php
+++ b/pts-core/objects/pts_BarGraph.php
@@ -63,7 +63,7 @@ class pts_BarGraph extends pts_CustomGraph
$font_size = $this->graph_font_size_bars;
- while($this->return_ttf_string_width(trim_double($this->graph_maximum_value, 3), $this->graph_font, $font_size) > ($bar_width - 6))
+ while($this->return_ttf_string_width($this->trim_double($this->graph_maximum_value, 3), $this->graph_font, $font_size) > ($bar_width - 6))
$font_size -= 0.5;
for($i_o = 0; $i_o < $bar_count; $i_o++)
@@ -98,7 +98,7 @@ class pts_BarGraph extends pts_CustomGraph
imagerectangle($this->graph_image, $px_bound_left + $size_diff_left, $value_plot_top - 1, $px_bound_right - $size_diff_right, $this->graph_top_end - 1, $this->graph_color_body_light);
imagefilledrectangle($this->graph_image, $px_bound_left + $size_diff_left + 1, $value_plot_top, $px_bound_right - $size_diff_right - 1, $this->graph_top_end - 1, $paint_color);
- $value = trim_double($value, 2);
+ $value = $this->trim_double($value, 2);
if($graph_size > 20)
$this->gd_write_text_center($this->graph_data[$i_o][$i], $font_size, $this->graph_color_body_text, $px_bound_left + (($px_bound_right - $px_bound_left) / 2), $value_plot_top + 3);
diff --git a/pts-core/objects/pts_Graph.php b/pts-core/objects/pts_Graph.php
index 9fda9aa..e98cd29 100644
--- a/pts-core/objects/pts_Graph.php
+++ b/pts-core/objects/pts_Graph.php
@@ -125,7 +125,7 @@ class pts_Graph
{
for($i = 0; $i < count($data_array); $i++)
if(is_float($data_array[$i]))
- $data_array[$i] = trim_double($data_array[$i], 2);
+ $data_array[$i] = $this->trim_double($data_array[$i], 2);
array_push($this->graph_data, $data_array);
array_push($this->graph_data_title, $data_title);
@@ -365,7 +365,7 @@ class pts_Graph
imageline($this->graph_image, $y, $px_from_top, $y += ($this->graph_left_end - $y) - 1, $px_from_top, $this->graph_color_body_light);
}
- $display_value += trim_double($this->graph_maximum_value / $this->graph_attr_marks, 2);
+ $display_value += $this->trim_double($this->graph_maximum_value / $this->graph_attr_marks, 2);
}
}
public function renderGraph()