From 02c8ec92ad7c0c70c026b651f47f62b32365a6a6 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Fri, 5 Nov 2021 19:58:40 +0100 Subject: [PATCH] feat: adjusted value size in the Line chart widget --- Kit/Widgets/LineChart.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kit/Widgets/LineChart.swift b/Kit/Widgets/LineChart.swift index 3ff48e64..6b078a0c 100644 --- a/Kit/Widgets/LineChart.swift +++ b/Kit/Widgets/LineChart.swift @@ -159,7 +159,7 @@ public class LineChart: WidgetWrapper { NSAttributedString.Key.paragraphStyle: style ] - let rect = CGRect(x: x+4, y: boxSize.height-7, width: boxSize.width-4, height: 7) + let rect = CGRect(x: Constants.Widget.margin.x, y: boxSize.height-7, width: self.width - Constants.Widget.margin.x - 1, height: 7) let str = NSAttributedString.init(string: "\(Int((value.rounded(toPlaces: 2)) * 100))%", attributes: stringAttributes) str.draw(with: rect)