Skip to content

Commit

Permalink
Consider offset in BalloonMarker of the Demo (Closes #1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed May 22, 2016
1 parent 49911c9 commit 0549e99
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ChartsDemo/Classes/Components/BalloonMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ public class BalloonMarker: ChartMarker
return
}

var rect = CGRect(origin: point, size: _size)
let offset = self.offsetForDrawingAtPos(point)

var rect = CGRect(
origin: CGPoint(
x: point.x + offset.x,
y: point.y + offset.y),
size: _size)
rect.origin.x -= _size.width / 2.0
rect.origin.y -= _size.height

Expand Down

0 comments on commit 0549e99

Please sign in to comment.