Skip to content

Commit

Permalink
Merge pull request #23 from rage28/master
Browse files Browse the repository at this point in the history
Fix computation of bubble label points
  • Loading branch information
szymach committed Apr 16, 2016
2 parents 9d4e357 + 5426a1a commit e234d6c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Chart/Bubble.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ public function writeBubbleLabel($SerieName, $SerieWeightName, $Points, $Format
$AxisUnit = $Data["Axis"][$AxisID]["Unit"];
$XStep = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1 - $XMargin * 2) / $XDivs;

$X = $this->pChartObject->GraphAreaX1 + $XMargin;
$Y = $this->pChartObject->GraphAreaY1 + $XMargin;
$X = $InitialX = $this->pChartObject->GraphAreaX1 + $XMargin;
$Y = $InitialY = $this->pChartObject->GraphAreaY1 + $XMargin;

$Color = array(
"R" => $Data["Series"][$SerieName]["Color"]["R"],
Expand Down Expand Up @@ -478,7 +478,7 @@ public function writeBubbleLabel($SerieName, $SerieWeightName, $Points, $Format
;
}

$X = floor($X + $Point * $XStep);
$X = floor($InitialX + $Point * $XStep);
$Y = floor($PosArray);
} else {
if ($XDivs == 0) {
Expand All @@ -490,7 +490,7 @@ public function writeBubbleLabel($SerieName, $SerieWeightName, $Points, $Format
}

$X = floor($PosArray);
$Y = floor($Y + $Point * $YStep);
$Y = floor($InitialY + $Point * $YStep);
}

if ($DrawPoint == LABEL_POINT_CIRCLE) {
Expand Down

0 comments on commit e234d6c

Please sign in to comment.