changeset 68:34844d649ed7

Hide ChartLabel on dragGesture
author Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com>
date Sat, 08 May 2021 18:38:35 +0200
parents 1a5b4d95e068
children 76a8e05b3266
files Sources/StockCharts/LineChart/LineChartView.swift StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Sources/StockCharts/LineChart/LineChartView.swift	Sat May 08 18:33:49 2021 +0200
+++ b/Sources/StockCharts/LineChart/LineChartView.swift	Sat May 08 18:38:35 2021 +0200
@@ -25,9 +25,11 @@
     
     public var body: some View {
         VStack {
-//            ChartLabel(data: data, dates: dates, hours: hours, indexPosition: $indexPosition)
-//                .opacity(showingIndicators ? 1: 0)
-//                .padding(.vertical)
+            if dragGesture ?? true {
+                ChartLabel(data: data, dates: dates, hours: hours, indexPosition: $indexPosition)
+                    .opacity(showingIndicators ? 1: 0)
+                    .padding(.vertical)
+            }
 
             LineView(data: data, dates: dates, hours: hours, dragGesture: dragGesture, showingIndicators: $showingIndicators, indexPosition: $indexPosition)
         }
Binary file StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed