diff options
author | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-21 02:35:00 +0400 |
---|---|---|
committer | matt <matt@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2009-04-21 02:35:00 +0400 |
commit | 338b088a5a04eb7f6b5dffe7a2b85605acd7539d (patch) | |
tree | af80faf4d49575190100157981f29b58a3773a7e /libs | |
parent | b009f1a053892c9450d5e44a9bcfbf1547b913fe (diff) |
- manually fixing offset in sparkline library
Diffstat (limited to 'libs')
-rw-r--r-- | libs/sparkline/lib/Sparkline.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/sparkline/lib/Sparkline.php b/libs/sparkline/lib/Sparkline.php index d6c306436e..a12b67e1a4 100644 --- a/libs/sparkline/lib/Sparkline.php +++ b/libs/sparkline/lib/Sparkline.php @@ -60,8 +60,8 @@ class Sparkline extends Object { // $this->graphAreaPx = array(array($this->graphAreaPx[0][0], $this->graphAreaPx[0][1]), - array($this->graphAreaPx[1][0] + $x - 1, - $this->graphAreaPx[1][1] + $y - 1)); + array($this->graphAreaPx[1][0] + $x, //FIX FROM PIWIK + $this->graphAreaPx[1][1] + $y)); //FIX FROM PIWIK $this->imageHandle = $this->CreateImageHandle($x, $y); @@ -356,8 +356,11 @@ class Sparkline extends Object { } function DrawTextRelative($string, $x, $y, $color, $position, $padding = 2, $font = FONT_1, $handle = false) { + if(empty($string)) + { + return; + } $this->Debug("Sparkline :: DrawTextRelative('$string', $x, $y, '$color', $position, $font, $padding)", DEBUG_DRAW); - if (!$this->IsError() && $colorHandle = $this->GetColorHandle($color)) { if ($handle === false) $handle = $this->imageHandle; |