Skip to content

Commit

Permalink
Fixed control flow error
Browse files Browse the repository at this point in the history
  • Loading branch information
AppPear committed Jul 5, 2020
1 parent 4705267 commit c6610f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Binary file not shown.
14 changes: 6 additions & 8 deletions Sources/SwiftUICharts/LineChart/MultiLineChartView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,13 @@ public struct MultiLineChartView: View {
.font(.callout)
.foregroundColor(self.colorScheme == .dark ? self.darkModeStyle.legendTextColor : self.style.legendTextColor)
}
if let rateValue = rateValue {
HStack {
if (rateValue >= 0){
Image(systemName: "arrow.up")
}else{
Image(systemName: "arrow.down")
}
Text("\(rateValue)%")
HStack {
if (rateValue ?? 0 >= 0){
Image(systemName: "arrow.up")
}else{
Image(systemName: "arrow.down")
}
Text("\(rateValue ?? 0)%")
}
}
.transition(.opacity)
Expand Down

0 comments on commit c6610f5

Please sign in to comment.