# HG changeset patch # User Dennis C. M. # Date 1624881673 -7200 # Node ID b0c81b2e624db4b9c51234dbb68083a9926cbfc4 # Parent facd63329f23125668e9ae492a17a27d027d1004# Parent 0c0d38dca6d84c55074d508f3f459341d9b59f68 Merge pull request #15 from denniscm190/testing Change colours to native swiftUI committer: GitHub diff -r facd63329f23 -r b0c81b2e624d README.md --- a/README.md Sun Jun 27 16:37:21 2021 +0200 +++ b/README.md Mon Jun 28 14:01:13 2021 +0200 @@ -46,7 +46,7 @@ RoundedRectangle(cornerRadius: 25) .frame(width: 400, height: 120) .foregroundColor(.white) - .shadow(color: Color(.gray).opacity(0.15), radius: 10) + .shadow(color: Color(,.gray).opacity(0.15), radius: 10) .overlay( VStack(alignment: .leading) { Text("Dennis Concepcion") diff -r facd63329f23 -r b0c81b2e624d Sources/StockCharts/CapsuleChart/CapsuleChartView.swift --- a/Sources/StockCharts/CapsuleChart/CapsuleChartView.swift Sun Jun 27 16:37:21 2021 +0200 +++ b/Sources/StockCharts/CapsuleChart/CapsuleChartView.swift Mon Jun 28 14:01:13 2021 +0200 @@ -17,24 +17,13 @@ ZStack { GeometryReader { proxy in Group { - #if os(iOS) Capsule() - .foregroundColor(Color(.systemGray)) + .foregroundColor(Color.gray) .opacity(0.2) Capsule() - .foregroundColor(Color(.systemBlue)) + .foregroundColor(Color.blue) .frame(width: proxy.size.width * percentageOfWidth) - #elseif os(watchOS) - Capsule() - .foregroundColor(Color(.gray)) - .opacity(0.2) - - Capsule() - .foregroundColor(Color(.blue)) - .frame(width: proxy.size.width * percentageOfWidth) - #endif - } .frame(height: 10) } diff -r facd63329f23 -r b0c81b2e624d Sources/StockCharts/LineChart/Helpers/ChartLabel.swift --- a/Sources/StockCharts/LineChart/Helpers/ChartLabel.swift Sun Jun 27 16:37:21 2021 +0200 +++ b/Sources/StockCharts/LineChart/Helpers/ChartLabel.swift Mon Jun 28 14:01:13 2021 +0200 @@ -28,14 +28,8 @@ .opacity(0.5) } - #if os(iOS) Text("\(data[indexPosition], specifier: "%.2f")") - .foregroundColor(Color(.systemBlue)) - - #elseif os(watchOS) - Text("\(data[indexPosition], specifier: "%.2f")") - .foregroundColor(Color(.blue)) - #endif + .foregroundColor(Color.blue) } .font(.caption) diff -r facd63329f23 -r b0c81b2e624d Sources/StockCharts/LineChart/Helpers/IndicatorPoint.swift --- a/Sources/StockCharts/LineChart/Helpers/IndicatorPoint.swift Sun Jun 27 16:37:21 2021 +0200 +++ b/Sources/StockCharts/LineChart/Helpers/IndicatorPoint.swift Mon Jun 28 14:01:13 2021 +0200 @@ -9,16 +9,8 @@ public struct IndicatorPoint: View { public var body: some View { - #if os(iOS) Circle() .frame(width: 20, height: 20) - .foregroundColor(Color(.systemBlue)) - - #elseif os(watchOS) - Circle() - .frame(width: 20, height: 20) - .foregroundColor(Color(.blue)) - #endif - + .foregroundColor(Color.blue) } } diff -r facd63329f23 -r b0c81b2e624d Sources/StockCharts/LineChart/Helpers/LineView.swift --- a/Sources/StockCharts/LineChart/Helpers/LineView.swift Sun Jun 27 16:37:21 2021 +0200 +++ b/Sources/StockCharts/LineChart/Helpers/LineView.swift Mon Jun 28 14:01:13 2021 +0200 @@ -58,26 +58,14 @@ Color path depending on data. */ public func colorLine() -> Color { - #if os(iOS) - let blue = Color(.systemBlue) - let teal = Color(.systemTeal) - let red = Color(.systemRed) - - var color = Color(.systemGreen) - #elseif os(watchOS) - let blue = Color(.blue) - let teal = Color(.blue) - let red = Color(.red) - - var color = Color(.green) - #endif + var color = Color.green if showingIndicators { - color = blue + color = Color.blue } else if data.first! > data.last! { - color = red + color = Color.red } else if data.first! == data.last! { - color = teal + color = Color.blue } return color diff -r facd63329f23 -r b0c81b2e624d StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate Binary file StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed