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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user