# HG changeset patch # User Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> # Date 1620493677 -7200 # Node ID cc59a30661f7deaa147e32c6f02c17607747a031 # Parent 552963ee4dc4b1709561969a803d032b6668809a Fixing: Modifying state during view update diff -r 552963ee4dc4 -r cc59a30661f7 Sources/StockCharts/LineChart/Helpers/LinePath.swift --- a/Sources/StockCharts/LineChart/Helpers/LinePath.swift Sat May 08 19:06:00 2021 +0200 +++ b/Sources/StockCharts/LineChart/Helpers/LinePath.swift Sat May 08 19:07:57 2021 +0200 @@ -31,16 +31,16 @@ } // Append current point to an array. Later will be used for Drag Gesture - DispatchQueue.main.async { - pathPoints.append(path.currentPoint!) - } + pathPoints.append(path.currentPoint!) + } + + DispatchQueue.main.async { + self.pathPoints = pathPoints } return path } -// public func test - /* Get data -> normalize it -> 0 <= output <= 1 */ diff -r 552963ee4dc4 -r cc59a30661f7 StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate Binary file StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed