From ea00ed0476a50d6ded2ff7a032fda23c56e7e98c Mon Sep 17 00:00:00 2001 From: Lavare Date: Thu, 23 Nov 2017 14:47:49 +0800 Subject: [PATCH] Fix BalloonMarker's text position calculation, consider insets --- ChartsDemo/Swift/Components/BalloonMarker.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChartsDemo/Swift/Components/BalloonMarker.swift b/ChartsDemo/Swift/Components/BalloonMarker.swift index d18b3d2823..2fe3e93141 100644 --- a/ChartsDemo/Swift/Components/BalloonMarker.swift +++ b/ChartsDemo/Swift/Components/BalloonMarker.swift @@ -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)