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

Commit

Permalink
Merge pull request #10 from denniscm190/dennis
Browse files Browse the repository at this point in the history
Fix bug color LineChartView on dragGesture
  • Loading branch information
denniscmcom committed Jun 6, 2021
2 parents 92c4eea + 3f1e5f8 commit 1fcfee1
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 1fcfee1

Please sign in to comment.