# HG changeset patch # User Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> # Date 1622998039 -7200 # Node ID e0c0306fb079bdfea95c98056a15c380568b35bd # Parent 2932cb8bcee3c0e10e5a62dc6c50f69dcb28f416 Fix bug color LineChartView on dragGesture diff -r 2932cb8bcee3 -r e0c0306fb079 Sources/StockCharts/LineChart/Helpers/LineView.swift --- a/Sources/StockCharts/LineChart/Helpers/LineView.swift Sun Jun 06 18:11:05 2021 +0200 +++ b/Sources/StockCharts/LineChart/Helpers/LineView.swift Sun Jun 06 18:47:19 2021 +0200 @@ -60,14 +60,13 @@ public func colorLine() -> Color { var color = Color(.systemGreen) - if data.first! > data.last! { + if showingIndicators { + color = Color(.systemBlue) + } else if data.first! > data.last! { color = Color(.systemRed) } else if data.first! == data.last! { color = Color(.systemTeal) } - else if showingIndicators { - color = Color(.systemBlue) - } return color } diff -r 2932cb8bcee3 -r e0c0306fb079 StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate Binary file StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed