Skip to content

Commit

Permalink
Fix BalloonMarker's text position calculation, consider insets
Browse files Browse the repository at this point in the history
  • Loading branch information
LavareX committed Nov 23, 2017
1 parent bc40b16 commit ea00ed0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ChartsDemo/Swift/Components/BalloonMarker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public class BalloonMarker: MarkerImage {
y: rect.origin.y))
context.fillPath()

rect.origin.x += self.insets.left
rect.origin.y += self.insets.top
rect.size.width -= self.insets.left + self.insets.right
rect.size.height -= self.insets.top + self.insets.bottom

UIGraphicsPushContext(context)
Expand Down

0 comments on commit ea00ed0

Please sign in to comment.