Mercurial > public > stock-charts
comparison Sources/StockCharts/LineChart/Helpers/LinePath.swift @ 95:468e6857c4ce
Unwrap optional path.current
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Wed, 16 Jun 2021 16:01:35 +0200 |
parents | b0eddc386535 |
children |
comparison
equal
deleted
inserted
replaced
94:e0c0306fb079 | 95:468e6857c4ce |
---|---|
29 let y = y * Double(height) | 29 let y = y * Double(height) |
30 path.addLine(to: CGPoint(x: x, y: y)) | 30 path.addLine(to: CGPoint(x: x, y: y)) |
31 } | 31 } |
32 | 32 |
33 // Append current point to an array. Later will be used for Drag Gesture | 33 // Append current point to an array. Later will be used for Drag Gesture |
34 pathPoints.append(path.currentPoint!) | 34 pathPoints.append(path.currentPoint ?? CGPoint(x: 0, y: 0)) |
35 } | 35 } |
36 | 36 |
37 DispatchQueue.main.async { | 37 DispatchQueue.main.async { |
38 self.pathPoints = pathPoints | 38 self.pathPoints = pathPoints |
39 } | 39 } |