Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sparkline/lib/Sparkline.php')
-rw-r--r--libs/sparkline/lib/Sparkline.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/libs/sparkline/lib/Sparkline.php b/libs/sparkline/lib/Sparkline.php
index 1641d7535d..d748538c54 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, //FIX FROM PIWIK
- $this->graphAreaPx[1][1] + $y)); //FIX FROM PIWIK
+ array($this->graphAreaPx[1][0] + $x - 1,
+ $this->graphAreaPx[1][1] + $y - 1));
$this->imageHandle = $this->CreateImageHandle($x, $y);
@@ -356,12 +356,9 @@ 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() &&
+
+ if (!empty($string) && !$this->IsError() &&
$colorHandle = $this->GetColorHandle($color)) {
if ($handle === false) $handle = $this->imageHandle;