From 77ccc2d33cbd690c20341406a68b7ec086473ae4 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)