diff --git a/.swiftpm/xcode/package.xcworkspace/xcuserdata/heoyeeun.xcuserdatad/UserInterfaceState.xcuserstate b/.swiftpm/xcode/package.xcworkspace/xcuserdata/heoyeeun.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 00000000..3c35393c
Binary files /dev/null and b/.swiftpm/xcode/package.xcworkspace/xcuserdata/heoyeeun.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/.swiftpm/xcode/xcuserdata/heoyeeun.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/.swiftpm/xcode/xcuserdata/heoyeeun.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
new file mode 100644
index 00000000..bf0e1092
--- /dev/null
+++ b/.swiftpm/xcode/xcuserdata/heoyeeun.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
diff --git a/.swiftpm/xcode/xcuserdata/heoyeeun.xcuserdatad/xcschemes/xcschememanagement.plist b/.swiftpm/xcode/xcuserdata/heoyeeun.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 00000000..4bd21c21
--- /dev/null
+++ b/.swiftpm/xcode/xcuserdata/heoyeeun.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,14 @@
+
+
+
+
+ SchemeUserState
+
+ SwiftUICharts.xcscheme_^#shared#^_
+
+ orderHint
+ 0
+
+
+
+
diff --git a/Sources/SwiftUICharts/LineChart/LineView.swift b/Sources/SwiftUICharts/LineChart/LineView.swift
index e485405a..914398c5 100644
--- a/Sources/SwiftUICharts/LineChart/LineView.swift
+++ b/Sources/SwiftUICharts/LineChart/LineView.swift
@@ -53,7 +53,7 @@ public struct LineView: View {
.font(.callout)
.foregroundColor(self.colorScheme == .dark ? self.darkModeStyle.legendTextColor : self.style.legendTextColor)
}
- }.offset(x: 0, y: 20)
+ }.offset(x: 0, y: 0)
ZStack{
GeometryReader{ reader in
Rectangle()
@@ -65,7 +65,7 @@ public struct LineView: View {
.animation(Animation.easeOut(duration: 1).delay(1))
}
Line(data: self.data,
- frame: .constant(CGRect(x: 0, y: 0, width: reader.frame(in: .local).width - 30, height: reader.frame(in: .local).height)),
+ frame: .constant(CGRect(x: 0, y: 0, width: reader.frame(in: .local).width - 30, height: reader.frame(in: .local).height + 30)),
touchLocation: self.$indicatorLocation,
showIndicator: self.$hideHorizontalLines,
minDataValue: .constant(nil),
@@ -73,7 +73,7 @@ public struct LineView: View {
showBackground: false,
gradient: self.style.gradientColor
)
- .offset(x: 30, y: -20)
+ .offset(x: 42.5, y: 0)
.onAppear(){
self.showLegend = true
}
@@ -91,7 +91,7 @@ public struct LineView: View {
.gesture(DragGesture()
.onChanged({ value in
self.dragLocation = value.location
- self.indicatorLocation = CGPoint(x: max(value.location.x-30,0), y: 32)
+ self.indicatorLocation = CGPoint(x: max(value.location.x-40,0), y: 32)
self.opacity = 1
self.closestPoint = self.getClosestDataPoint(toPoint: value.location, width: geometry.frame(in: .local).size.width-30, height: 240)
self.hideHorizontalLines = true
@@ -126,6 +126,8 @@ struct LineView_Previews: PreviewProvider {
LineView(data: [282.502, 284.495, 283.51, 285.019, 285.197, 286.118, 288.737, 288.455, 289.391, 287.691, 285.878, 286.46, 286.252, 284.652, 284.129, 284.188], title: "Full chart", style: Styles.lineChartStyleOne)
+ LineView(data: [60, 55, 50, 50], title: "Full chart", style: Styles.lineChartStyleOne)
+
}
}
}
diff --git a/Sources/SwiftUICharts/LineChart/MagnifierRect.swift b/Sources/SwiftUICharts/LineChart/MagnifierRect.swift
index 4d3fd869..2a8b360c 100644
--- a/Sources/SwiftUICharts/LineChart/MagnifierRect.swift
+++ b/Sources/SwiftUICharts/LineChart/MagnifierRect.swift
@@ -15,15 +15,15 @@ public struct MagnifierRect: View {
ZStack{
Text("\(self.currentNumber, specifier: valueSpecifier)")
.font(.system(size: 18, weight: .bold))
- .offset(x: 0, y:-110)
+ .offset(x: 0, y: -140)
.foregroundColor(self.colorScheme == .dark ? Color.white : Color.black)
if (self.colorScheme == .dark ){
RoundedRectangle(cornerRadius: 16)
.stroke(Color.white, lineWidth: self.colorScheme == .dark ? 2 : 0)
- .frame(width: 60, height: 260)
+ .frame(width: 60, height: 300)
}else{
RoundedRectangle(cornerRadius: 16)
- .frame(width: 60, height: 280)
+ .frame(width: 60, height: 320)
.foregroundColor(Color.white)
.shadow(color: Colors.LegendText, radius: 12, x: 0, y: 6 )
.blendMode(.multiply)