Dark/Light mode fixes (#148)

Fix for making text work with both Dark/Light mode.

Also solves line chart background to appear white in dark mode
This commit is contained in:
Sagar Patel
2020-07-31 13:13:56 +02:00
committed by GitHub
parent 7fb2a0013c
commit 2ef73c84e2
2 changed files with 5 additions and 5 deletions
@@ -49,13 +49,13 @@ public struct ChartLabel: View {
private var labelColor: Color {
switch labelType {
case .title:
return .black
return Color(UIColor.label)
case .legend:
return .gray
return Color(UIColor.secondaryLabel)
case .subTitle:
return .black
return Color(UIColor.label)
case .largeTitle:
return .black
return Color(UIColor.label)
case .custom(_, _, let color):
return color
}
@@ -94,7 +94,7 @@ extension Line {
.fill(LinearGradient(gradient: Gradient(colors: [
style.foregroundColor.first?.startColor ?? .white,
style.foregroundColor.first?.endColor ?? .white,
.white]),
.clear]),
startPoint: .bottom,
endPoint: .top))
.rotationEffect(.degrees(180), anchor: .center)