Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Commit

Permalink
Fix bug color LineChartView on dragGesture
Browse files Browse the repository at this point in the history
  • Loading branch information
denniscmcom committed Jun 6, 2021
1 parent 92c4eea commit 3f1e5f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Sources/StockCharts/LineChart/Helpers/LineView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ public struct LineView: View {
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
}
Expand Down
Binary file not shown.

0 comments on commit 3f1e5f8

Please sign in to comment.