Mercurial > public > stock-charts
changeset 21:5135ff3343ae
Rename project to StockCharts
author | Dennis Concepción Martín <66180929+denniscm190@users.noreply.github.com> |
---|---|
date | Fri, 30 Apr 2021 17:40:33 +0200 |
parents | 24dfde3727c1 |
children | 5c9f74baee88 |
files | Package.swift Previews/ChartViewPreview.swift Previews/ContentView.swift Previews/Sample data/GenerateSampleData.swift README.md Sources/InteractiveCharts/Info.plist Sources/InteractiveCharts/InteractiveCharts.h Sources/InteractiveCharts/LineChart/ChartView.swift Sources/InteractiveCharts/LineChart/Helpers/ChartLabel.swift Sources/InteractiveCharts/LineChart/Helpers/IndicatorPoint.swift Sources/InteractiveCharts/LineChart/Helpers/LinePath.swift Sources/InteractiveCharts/LineChart/Helpers/LineView.swift Sources/InteractiveCharts/UI Previews/ChartViewPreview.swift Sources/InteractiveCharts/UI Previews/ContentView.swift Sources/InteractiveCharts/UI Previews/Sample data/GenerateSampleData.swift Sources/StockCharts/Info.plist Sources/StockCharts/LineChart/ChartView.swift Sources/StockCharts/LineChart/Helpers/ChartLabel.swift Sources/StockCharts/LineChart/Helpers/IndicatorPoint.swift Sources/StockCharts/LineChart/Helpers/LinePath.swift Sources/StockCharts/LineChart/Helpers/LineView.swift Sources/StockCharts/StockCharts.h StockCharts.xcodeproj/project.pbxproj StockCharts.xcodeproj/project.xcworkspace/contents.xcworkspacedata StockCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate StockCharts.xcodeproj/xcshareddata/xcschemes/StockCharts.xcscheme StockCharts.xcodeproj/xcuserdata/dennis.xcuserdatad/xcschemes/xcschememanagement.plist SwiftUI-InteractiveCharts.xcodeproj/project.pbxproj SwiftUI-InteractiveCharts.xcodeproj/project.xcworkspace/contents.xcworkspacedata SwiftUI-InteractiveCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist SwiftUI-InteractiveCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate SwiftUI-InteractiveCharts.xcodeproj/xcuserdata/dennis.xcuserdatad/xcschemes/xcschememanagement.plist Tests/InteractiveChartsTests/Info.plist Tests/InteractiveChartsTests/InteractiveChartsTests.swift Tests/StockChartsTests/Info.plist Tests/StockChartsTests/StockChartsTests.swift |
diffstat | 37 files changed, 1132 insertions(+), 1053 deletions(-) [+] |
line wrap: on
line diff
--- a/Package.swift Wed Apr 28 20:24:54 2021 +0200 +++ b/Package.swift Fri Apr 30 17:40:33 2021 +0200 @@ -1,6 +1,5 @@ // swift-tools-version:5.3 // The swift-tools-version declares the minimum version of Swift required to build this package. - import PackageDescription /* @@ -8,24 +7,24 @@ */ let package = Package( - name: "SwiftUI-InteractiveCharts", + name: "StockCharts", platforms: [ .iOS(.v14) ], products: [ .library( - name: "SwiftUIInteractiveCharts", - targets: ["SwiftUI-InteractiveCharts"]), + name: "StockCharts", + targets: ["StockCharts"]), ], dependencies: [ ], targets: [ .target( - name: "SwiftUI-InteractiveCharts", + name: "StockCharts", dependencies: []), .testTarget( - name: "SwiftUI-InteractiveChartsTests", - dependencies: ["SwiftUI-InteractiveCharts"]), + name: "StockChartsTests", + dependencies: ["StockCharts"]), ] )
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Previews/ChartViewPreview.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,54 @@ +// +// ChartViewPreview.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + + +struct ChartViewPreview: View { + var data: [Double] + var dates: [String]? + var hours: [String]? + + var range = ["5D", "1M", "3M", "1Y", "5Y"] + @State private var selectedRange = "3M" + + var body: some View { + NavigationView { + VStack(alignment: .leading) { + Text("Apple Inc") + .font(.title3) + .padding([.horizontal, .bottom]) + + Picker("Select a range", selection: $selectedRange) { + ForEach(range, id: \.self) { + Text($0) + } + } + .pickerStyle(SegmentedPickerStyle()) + .padding(.horizontal) + + ChartView(data: data, dates: dates, hours: hours) + .padding(.vertical) + } + .navigationTitle("AAPL") + .toolbar { + ToolbarItem(placement: .navigationBarTrailing) { + Button(action: {}) { + Image(systemName: "star") + } + } + + ToolbarItem(placement: .navigationBarLeading) { + Button(action: {}) { + Image(systemName: "plus.circle") + } + } + } + } + .navigationViewStyle(StackNavigationViewStyle()) + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Previews/ContentView.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,25 @@ +// +// ContentView.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + TabView { + ChartViewPreview(data: generateSampleData(350)) + .tabItem { + Label("ChartView", systemImage: "house") + } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Previews/Sample data/GenerateSampleData.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,30 @@ +// +// GenerateSampleData.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + + +/* + Generate sample data + */ +func generateSampleData(_ n: Int) -> [Double] { + var prices = [Double]() + + for _ in (1..<n) { + var lastPrice = prices.last ?? 50.0 + let randomNumber = Double.random(in: 0...0.02) + + if randomNumber < 0.013 { + lastPrice = lastPrice * (1 - randomNumber) + } else { + lastPrice = lastPrice * (1 + randomNumber) + } + + prices.append(lastPrice) + } + return prices +}
--- a/README.md Wed Apr 28 20:24:54 2021 +0200 +++ b/README.md Fri Apr 30 17:40:33 2021 +0200 @@ -28,6 +28,3 @@ dates: ["yyyy-MM-dd", "2021-01-01", "2021-01-02", ...] hours: ["10:20", "10:21", "10:22", ...] // It could be any format ``` - - -
--- a/Sources/InteractiveCharts/Info.plist Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>$(DEVELOPMENT_LANGUAGE)</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>$(PRODUCT_NAME)</string> - <key>CFBundlePackageType</key> - <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleVersion</key> - <string>$(CURRENT_PROJECT_VERSION)</string> -</dict> -</plist>
--- a/Sources/InteractiveCharts/InteractiveCharts.h Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -// -// InteractiveCharts.h -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -#import <Foundation/Foundation.h> - -//! Project version number for InteractiveCharts. -FOUNDATION_EXPORT double InteractiveChartsVersionNumber; - -//! Project version string for InteractiveCharts. -FOUNDATION_EXPORT const unsigned char InteractiveChartsVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import <InteractiveCharts/PublicHeader.h> - -
--- a/Sources/InteractiveCharts/LineChart/ChartView.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -// -// ChartView.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -public struct ChartView: View { - var data: [Double] - var dates: [String]? - var hours: [String]? - - @State var showingIndicators = false - @State var indexPosition = Int() - - public var body: some View { - VStack { - ChartLabel(data: data, dates: dates, hours: hours, indexPosition: $indexPosition) - .opacity(showingIndicators ? 1: 0) - .padding(.vertical) - - LineView(data: data, showingIndicators: $showingIndicators, indexPosition: $indexPosition) - } - } -}
--- a/Sources/InteractiveCharts/LineChart/Helpers/ChartLabel.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -// -// ChartLabel.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -public struct ChartLabel: View { - var data: [Double] - var dates: [String]? - var hours: [String]? - - @Binding var indexPosition: Int // Data point position - - public var body: some View { - HStack { - Group { - if let dates = self.dates { - let date = formatStringDate(dates[indexPosition]) - Text(date) - } - if let hours = self.hours { - let hour = hours[indexPosition] - Text(hour) - } - Text("\(data[indexPosition], specifier: "%.2f")") - .foregroundColor(Color(.systemBlue)) - } - .font(.headline) - } - } - - /* - Take string in format yy-MM-dd (2021-01-01) and transform it - to long default string format - */ - public func formatStringDate(_ stringDate: String) -> String { - let dateFormatter = DateFormatter() - dateFormatter.dateFormat = "yy-MM-dd" - let date = dateFormatter.date(from: stringDate) - - // Format date to the final format - dateFormatter.dateStyle = .long - let finalDate = dateFormatter.string(from: date!) - - return finalDate - } -}
--- a/Sources/InteractiveCharts/LineChart/Helpers/IndicatorPoint.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -// -// IndicatorPoint.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -public struct IndicatorPoint: View { - public var body: some View { - Circle() - .frame(width: 20, height: 20) - .foregroundColor(Color(.systemBlue)) - - } -}
--- a/Sources/InteractiveCharts/LineChart/Helpers/LinePath.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// -// LinePath.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -public struct LinePath: Shape { - var data: [Double] - var (width, height): (CGFloat, CGFloat) - @Binding var pathPoints: [CGPoint] - - public func path(in rect: CGRect) -> Path { - var path = Path() - - let normalizedData = normalize(data) - let widthBetweenDataPoints = Double(width) / Double(normalizedData.count - 1) // Remove first point - let initialPoint = normalizedData[0] * Double(height) - var x: Double = 0 - - path.move(to: CGPoint(x: x, y: initialPoint)) - for y in normalizedData { - if normalizedData.firstIndex(of: y) != 0 { // Skip first point - x += widthBetweenDataPoints - let y = y * Double(height) - path.addLine(to: CGPoint(x: x, y: y)) - } - - // Append current point to an array. Later will be used for Drag Gesture - pathPoints.append(path.currentPoint!) - } - - return path - } - - /* - Get data -> normalize it -> 0 <= output <= 1 - */ - public func normalize(_ data: [Double]) -> [Double] { - var normalData = [Double]() - let min = data.min()! - let max = data.max()! - - for value in data { - let normal = (value - min) / (max - min) - normalData.append(normal) - } - - return normalData - } -} -
--- a/Sources/InteractiveCharts/LineChart/Helpers/LineView.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -// -// LineView.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -public struct LineView: View { - var data: [Double] - var dates: [String]? - var hours: [String]? - - @Binding var showingIndicators: Bool - @Binding var indexPosition: Int - @State var IndicatorPointPosition: CGPoint = .zero - @State var pathPoints = [CGPoint]() - - public var body: some View { - ZStack { - GeometryReader { proxy in - LinePath(data: data, width: proxy.size.width, height: proxy.size.height, pathPoints: $pathPoints) - .stroke(colorLine(), lineWidth: 2) - } - - if showingIndicators { - IndicatorPoint() - .position(x: IndicatorPointPosition.x, y: IndicatorPointPosition.y) - } - } - .rotationEffect(.degrees(180), anchor: .center) - .rotation3DEffect(.degrees(180), axis: (x: 0.0, y: 1.0, z: 0.0)) - .contentShape(Rectangle()) // Control tappable area - .gesture( - LongPressGesture(minimumDuration: 0.2) - .sequenced(before: DragGesture(minimumDistance: 0, coordinateSpace: .local)) - .onChanged({ value in // Get value of the gesture - switch value { - case .second(true, let drag): - if let longPressLocation = drag?.location { - dragGesture(longPressLocation) - } - default: - break - } - }) - // Hide indicator when finish - .onEnded({ value in - self.showingIndicators = false - }) - ) - } - - /* - Color path depending on data. - */ - public func colorLine() -> Color { - var color = Color(.systemGreen) - - 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 - } - - /* - When the user drag on Path -> Modifiy indicator point to move it on the path accordingly - */ - public func dragGesture(_ longPressLocation: CGPoint) { - let (closestXPoint, closestYPoint, yPointIndex) = getClosestValueFrom(longPressLocation, inData: pathPoints) - self.IndicatorPointPosition.x = closestXPoint - self.IndicatorPointPosition.y = closestYPoint - self.showingIndicators = true - self.indexPosition = yPointIndex - } - - /* - First, search the closest X point in Path from the tapped location. - Then, find the correspondent Y point in Path. - */ - public func getClosestValueFrom(_ value: CGPoint, inData: [CGPoint]) -> (CGFloat, CGFloat, Int) { - let touchPoint: (CGFloat, CGFloat) = (value.x, value.y) - let xPathPoints = inData.map { $0.x } - let yPathPoints = inData.map { $0.y } - - // Closest X value - let closestXPoint = xPathPoints.enumerated().min( by: { abs($0.1 - touchPoint.0) < abs($1.1 - touchPoint.0) } )! - let closestYPointIndex = xPathPoints.firstIndex(of: closestXPoint.element)! - let closestYPoint = yPathPoints[closestYPointIndex] - - // Index of the closest points in the array - let yPointIndex = yPathPoints.firstIndex(of: closestYPoint)! - - return (closestXPoint.element, closestYPoint, yPointIndex) - } -}
--- a/Sources/InteractiveCharts/UI Previews/ChartViewPreview.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -// -// ChartViewPreview.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -struct ChartViewPreview: View { - var data: [Double] - var dates: [String]? - var hours: [String]? - - var range = ["5D", "1M", "3M", "1Y", "5Y"] - @State private var selectedRange = "3M" - - var body: some View { - NavigationView { - VStack(alignment: .leading) { - Text("Apple Inc") - .font(.title3) - .padding([.horizontal, .bottom]) - - Picker("Select a range", selection: $selectedRange) { - ForEach(range, id: \.self) { - Text($0) - } - } - .pickerStyle(SegmentedPickerStyle()) - .padding(.horizontal) - - ChartView(data: data, dates: dates, hours: hours) - .padding(.vertical) - } - .navigationTitle("AAPL") - .toolbar { - ToolbarItem(placement: .navigationBarTrailing) { - Button(action: {}) { - Image(systemName: "star") - } - } - - ToolbarItem(placement: .navigationBarLeading) { - Button(action: {}) { - Image(systemName: "plus.circle") - } - } - } - } - .navigationViewStyle(StackNavigationViewStyle()) - } -}
--- a/Sources/InteractiveCharts/UI Previews/ContentView.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -// -// ContentView.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -struct ContentView: View { - var body: some View { - TabView { - ChartViewPreview(data: generateSampleData(350)) - .tabItem { - Label("ChartView", systemImage: "house") - } - } - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -}
--- a/Sources/InteractiveCharts/UI Previews/Sample data/GenerateSampleData.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -// -// GenerateSampleData.swift -// InteractiveCharts -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import SwiftUI - -/* - Generate sample data - */ -func generateSampleData(_ n: Int) -> [Double] { - var prices = [Double]() - - for _ in (1..<n) { - var lastPrice = prices.last ?? 50.0 - let randomNumber = Double.random(in: 0...0.02) - - if randomNumber < 0.013 { - lastPrice = lastPrice * (1 - randomNumber) - } else { - lastPrice = lastPrice * (1 + randomNumber) - } - - prices.append(lastPrice) - } - return prices -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/StockCharts/Info.plist Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>$(CURRENT_PROJECT_VERSION)</string> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/StockCharts/LineChart/ChartView.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,27 @@ +// +// ChartView.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + +public struct ChartView: View { + var data: [Double] + var dates: [String]? + var hours: [String]? + + @State var showingIndicators = false + @State var indexPosition = Int() + + public var body: some View { + VStack { + ChartLabel(data: data, dates: dates, hours: hours, indexPosition: $indexPosition) + .opacity(showingIndicators ? 1: 0) + .padding(.vertical) + + LineView(data: data, showingIndicators: $showingIndicators, indexPosition: $indexPosition) + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/StockCharts/LineChart/Helpers/ChartLabel.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,50 @@ +// +// ChartLabel.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + +public struct ChartLabel: View { + var data: [Double] + var dates: [String]? + var hours: [String]? + + @Binding var indexPosition: Int // Data point position + + public var body: some View { + HStack { + Group { + if let dates = self.dates { + let date = formatStringDate(dates[indexPosition]) + Text(date) + } + if let hours = self.hours { + let hour = hours[indexPosition] + Text(hour) + } + Text("\(data[indexPosition], specifier: "%.2f")") + .foregroundColor(Color(.systemBlue)) + } + .font(.headline) + } + } + + /* + Take string in format yy-MM-dd (2021-01-01) and transform it + to long default string format + */ + public func formatStringDate(_ stringDate: String) -> String { + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "yy-MM-dd" + let date = dateFormatter.date(from: stringDate) + + // Format date to the final format + dateFormatter.dateStyle = .long + let finalDate = dateFormatter.string(from: date!) + + return finalDate + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/StockCharts/LineChart/Helpers/IndicatorPoint.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,17 @@ +// +// IndicatorPoint.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + +public struct IndicatorPoint: View { + public var body: some View { + Circle() + .frame(width: 20, height: 20) + .foregroundColor(Color(.systemBlue)) + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/StockCharts/LineChart/Helpers/LinePath.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,54 @@ +// +// LinePath.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + +public struct LinePath: Shape { + var data: [Double] + var (width, height): (CGFloat, CGFloat) + @Binding var pathPoints: [CGPoint] + + public func path(in rect: CGRect) -> Path { + var path = Path() + + let normalizedData = normalize(data) + let widthBetweenDataPoints = Double(width) / Double(normalizedData.count - 1) // Remove first point + let initialPoint = normalizedData[0] * Double(height) + var x: Double = 0 + + path.move(to: CGPoint(x: x, y: initialPoint)) + for y in normalizedData { + if normalizedData.firstIndex(of: y) != 0 { // Skip first point + x += widthBetweenDataPoints + let y = y * Double(height) + path.addLine(to: CGPoint(x: x, y: y)) + } + + // Append current point to an array. Later will be used for Drag Gesture + pathPoints.append(path.currentPoint!) + } + + return path + } + + /* + Get data -> normalize it -> 0 <= output <= 1 + */ + public func normalize(_ data: [Double]) -> [Double] { + var normalData = [Double]() + let min = data.min()! + let max = data.max()! + + for value in data { + let normal = (value - min) / (max - min) + normalData.append(normal) + } + + return normalData + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/StockCharts/LineChart/Helpers/LineView.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,103 @@ +// +// LineView.swift +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import SwiftUI + +public struct LineView: View { + var data: [Double] + var dates: [String]? + var hours: [String]? + + @Binding var showingIndicators: Bool + @Binding var indexPosition: Int + @State var IndicatorPointPosition: CGPoint = .zero + @State var pathPoints = [CGPoint]() + + public var body: some View { + ZStack { + GeometryReader { proxy in + LinePath(data: data, width: proxy.size.width, height: proxy.size.height, pathPoints: $pathPoints) + .stroke(colorLine(), lineWidth: 2) + } + + if showingIndicators { + IndicatorPoint() + .position(x: IndicatorPointPosition.x, y: IndicatorPointPosition.y) + } + } + .rotationEffect(.degrees(180), anchor: .center) + .rotation3DEffect(.degrees(180), axis: (x: 0.0, y: 1.0, z: 0.0)) + .contentShape(Rectangle()) // Control tappable area + .gesture( + LongPressGesture(minimumDuration: 0.2) + .sequenced(before: DragGesture(minimumDistance: 0, coordinateSpace: .local)) + .onChanged({ value in // Get value of the gesture + switch value { + case .second(true, let drag): + if let longPressLocation = drag?.location { + dragGesture(longPressLocation) + } + default: + break + } + }) + // Hide indicator when finish + .onEnded({ value in + self.showingIndicators = false + }) + ) + } + + /* + Color path depending on data. + */ + public func colorLine() -> Color { + var color = Color(.systemGreen) + + 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 + } + + /* + When the user drag on Path -> Modifiy indicator point to move it on the path accordingly + */ + public func dragGesture(_ longPressLocation: CGPoint) { + let (closestXPoint, closestYPoint, yPointIndex) = getClosestValueFrom(longPressLocation, inData: pathPoints) + self.IndicatorPointPosition.x = closestXPoint + self.IndicatorPointPosition.y = closestYPoint + self.showingIndicators = true + self.indexPosition = yPointIndex + } + + /* + First, search the closest X point in Path from the tapped location. + Then, find the correspondent Y point in Path. + */ + public func getClosestValueFrom(_ value: CGPoint, inData: [CGPoint]) -> (CGFloat, CGFloat, Int) { + let touchPoint: (CGFloat, CGFloat) = (value.x, value.y) + let xPathPoints = inData.map { $0.x } + let yPathPoints = inData.map { $0.y } + + // Closest X value + let closestXPoint = xPathPoints.enumerated().min( by: { abs($0.1 - touchPoint.0) < abs($1.1 - touchPoint.0) } )! + let closestYPointIndex = xPathPoints.firstIndex(of: closestXPoint.element)! + let closestYPoint = yPathPoints[closestYPointIndex] + + // Index of the closest points in the array + let yPointIndex = yPathPoints.firstIndex(of: closestYPoint)! + + return (closestXPoint.element, closestYPoint, yPointIndex) + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sources/StockCharts/StockCharts.h Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,18 @@ +// +// StockCharts.h +// StockCharts +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +#import <Foundation/Foundation.h> + +//! Project version number for StockCharts. +FOUNDATION_EXPORT double StockChartsVersionNumber; + +//! Project version string for StockCharts. +FOUNDATION_EXPORT const unsigned char StockChartsVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import <StockCharts/PublicHeader.h> + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StockCharts.xcodeproj/project.pbxproj Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,552 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 95770B8B263C57B5003FA924 /* StockCharts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95770B81263C57B5003FA924 /* StockCharts.framework */; }; + 95770B90263C57B5003FA924 /* StockChartsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770B8F263C57B5003FA924 /* StockChartsTests.swift */; }; + 95770B92263C57B5003FA924 /* StockCharts.h in Headers */ = {isa = PBXBuildFile; fileRef = 95770B84263C57B5003FA924 /* StockCharts.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95770BA0263C590C003FA924 /* ChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770B9F263C590C003FA924 /* ChartView.swift */; }; + 95770BA3263C5934003FA924 /* ChartLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770BA2263C5934003FA924 /* ChartLabel.swift */; }; + 95770BA5263C594C003FA924 /* IndicatorPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770BA4263C594C003FA924 /* IndicatorPoint.swift */; }; + 95770BA7263C596E003FA924 /* LinePath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770BA6263C596E003FA924 /* LinePath.swift */; }; + 95770BA9263C5988003FA924 /* LineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770BA8263C5988003FA924 /* LineView.swift */; }; + 95770BAD263C5A13003FA924 /* ChartViewPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770BAC263C5A13003FA924 /* ChartViewPreview.swift */; }; + 95770BAF263C5A29003FA924 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770BAE263C5A29003FA924 /* ContentView.swift */; }; + 95770BB2263C5A54003FA924 /* GenerateSampleData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95770BB1263C5A54003FA924 /* GenerateSampleData.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 95770B8C263C57B5003FA924 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 95770B78263C57B5003FA924 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 95770B80263C57B5003FA924; + remoteInfo = StockCharts; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 95770B81263C57B5003FA924 /* StockCharts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = StockCharts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 95770B84263C57B5003FA924 /* StockCharts.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StockCharts.h; sourceTree = "<group>"; }; + 95770B85263C57B5003FA924 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 95770B8A263C57B5003FA924 /* StockChartsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StockChartsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 95770B8F263C57B5003FA924 /* StockChartsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StockChartsTests.swift; sourceTree = "<group>"; }; + 95770B91263C57B5003FA924 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; + 95770B9D263C58B1003FA924 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; + 95770B9F263C590C003FA924 /* ChartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartView.swift; sourceTree = "<group>"; }; + 95770BA2263C5934003FA924 /* ChartLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartLabel.swift; sourceTree = "<group>"; }; + 95770BA4263C594C003FA924 /* IndicatorPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndicatorPoint.swift; sourceTree = "<group>"; }; + 95770BA6263C596E003FA924 /* LinePath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinePath.swift; sourceTree = "<group>"; }; + 95770BA8263C5988003FA924 /* LineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineView.swift; sourceTree = "<group>"; }; + 95770BAA263C59A9003FA924 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; }; + 95770BAC263C5A13003FA924 /* ChartViewPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartViewPreview.swift; sourceTree = "<group>"; }; + 95770BAE263C5A29003FA924 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; }; + 95770BB1263C5A54003FA924 /* GenerateSampleData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateSampleData.swift; sourceTree = "<group>"; }; + 95770BB3263C5C2B003FA924 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = LICENSE.md; sourceTree = "<group>"; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 95770B7E263C57B5003FA924 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 95770B87263C57B5003FA924 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 95770B8B263C57B5003FA924 /* StockCharts.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 95770B77263C57B5003FA924 = { + isa = PBXGroup; + children = ( + 95770BAA263C59A9003FA924 /* Package.swift */, + 95770B9D263C58B1003FA924 /* README.md */, + 95770BB3263C5C2B003FA924 /* LICENSE.md */, + 95770B9B263C57CA003FA924 /* Sources */, + 95770B9C263C580C003FA924 /* Tests */, + 95770BAB263C59F5003FA924 /* Previews */, + 95770B82263C57B5003FA924 /* Products */, + ); + sourceTree = "<group>"; + }; + 95770B82263C57B5003FA924 /* Products */ = { + isa = PBXGroup; + children = ( + 95770B81263C57B5003FA924 /* StockCharts.framework */, + 95770B8A263C57B5003FA924 /* StockChartsTests.xctest */, + ); + name = Products; + sourceTree = "<group>"; + }; + 95770B83263C57B5003FA924 /* StockCharts */ = { + isa = PBXGroup; + children = ( + 95770B9E263C58F4003FA924 /* LineChart */, + 95770B84263C57B5003FA924 /* StockCharts.h */, + 95770B85263C57B5003FA924 /* Info.plist */, + ); + path = StockCharts; + sourceTree = "<group>"; + }; + 95770B8E263C57B5003FA924 /* StockChartsTests */ = { + isa = PBXGroup; + children = ( + 95770B8F263C57B5003FA924 /* StockChartsTests.swift */, + 95770B91263C57B5003FA924 /* Info.plist */, + ); + path = StockChartsTests; + sourceTree = "<group>"; + }; + 95770B9B263C57CA003FA924 /* Sources */ = { + isa = PBXGroup; + children = ( + 95770B83263C57B5003FA924 /* StockCharts */, + ); + path = Sources; + sourceTree = "<group>"; + }; + 95770B9C263C580C003FA924 /* Tests */ = { + isa = PBXGroup; + children = ( + 95770B8E263C57B5003FA924 /* StockChartsTests */, + ); + path = Tests; + sourceTree = "<group>"; + }; + 95770B9E263C58F4003FA924 /* LineChart */ = { + isa = PBXGroup; + children = ( + 95770B9F263C590C003FA924 /* ChartView.swift */, + 95770BA1263C5927003FA924 /* Helpers */, + ); + path = LineChart; + sourceTree = "<group>"; + }; + 95770BA1263C5927003FA924 /* Helpers */ = { + isa = PBXGroup; + children = ( + 95770BA2263C5934003FA924 /* ChartLabel.swift */, + 95770BA4263C594C003FA924 /* IndicatorPoint.swift */, + 95770BA6263C596E003FA924 /* LinePath.swift */, + 95770BA8263C5988003FA924 /* LineView.swift */, + ); + path = Helpers; + sourceTree = "<group>"; + }; + 95770BAB263C59F5003FA924 /* Previews */ = { + isa = PBXGroup; + children = ( + 95770BAE263C5A29003FA924 /* ContentView.swift */, + 95770BAC263C5A13003FA924 /* ChartViewPreview.swift */, + 95770BB0263C5A34003FA924 /* Sample data */, + ); + path = Previews; + sourceTree = "<group>"; + }; + 95770BB0263C5A34003FA924 /* Sample data */ = { + isa = PBXGroup; + children = ( + 95770BB1263C5A54003FA924 /* GenerateSampleData.swift */, + ); + path = "Sample data"; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 95770B7C263C57B5003FA924 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 95770B92263C57B5003FA924 /* StockCharts.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 95770B80263C57B5003FA924 /* StockCharts */ = { + isa = PBXNativeTarget; + buildConfigurationList = 95770B95263C57B5003FA924 /* Build configuration list for PBXNativeTarget "StockCharts" */; + buildPhases = ( + 95770B7C263C57B5003FA924 /* Headers */, + 95770B7D263C57B5003FA924 /* Sources */, + 95770B7E263C57B5003FA924 /* Frameworks */, + 95770B7F263C57B5003FA924 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = StockCharts; + productName = StockCharts; + productReference = 95770B81263C57B5003FA924 /* StockCharts.framework */; + productType = "com.apple.product-type.framework"; + }; + 95770B89263C57B5003FA924 /* StockChartsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 95770B98263C57B5003FA924 /* Build configuration list for PBXNativeTarget "StockChartsTests" */; + buildPhases = ( + 95770B86263C57B5003FA924 /* Sources */, + 95770B87263C57B5003FA924 /* Frameworks */, + 95770B88263C57B5003FA924 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 95770B8D263C57B5003FA924 /* PBXTargetDependency */, + ); + name = StockChartsTests; + productName = StockChartsTests; + productReference = 95770B8A263C57B5003FA924 /* StockChartsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 95770B78263C57B5003FA924 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1250; + LastUpgradeCheck = 1250; + TargetAttributes = { + 95770B80263C57B5003FA924 = { + CreatedOnToolsVersion = 12.5; + LastSwiftMigration = 1250; + }; + 95770B89263C57B5003FA924 = { + CreatedOnToolsVersion = 12.5; + }; + }; + }; + buildConfigurationList = 95770B7B263C57B5003FA924 /* Build configuration list for PBXProject "StockCharts" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 95770B77263C57B5003FA924; + productRefGroup = 95770B82263C57B5003FA924 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 95770B80263C57B5003FA924 /* StockCharts */, + 95770B89263C57B5003FA924 /* StockChartsTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 95770B7F263C57B5003FA924 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 95770B88263C57B5003FA924 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 95770B7D263C57B5003FA924 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 95770BA0263C590C003FA924 /* ChartView.swift in Sources */, + 95770BA3263C5934003FA924 /* ChartLabel.swift in Sources */, + 95770BB2263C5A54003FA924 /* GenerateSampleData.swift in Sources */, + 95770BAF263C5A29003FA924 /* ContentView.swift in Sources */, + 95770BAD263C5A13003FA924 /* ChartViewPreview.swift in Sources */, + 95770BA7263C596E003FA924 /* LinePath.swift in Sources */, + 95770BA9263C5988003FA924 /* LineView.swift in Sources */, + 95770BA5263C594C003FA924 /* IndicatorPoint.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 95770B86263C57B5003FA924 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 95770B90263C57B5003FA924 /* StockChartsTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 95770B8D263C57B5003FA924 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 95770B80263C57B5003FA924 /* StockCharts */; + targetProxy = 95770B8C263C57B5003FA924 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 95770B93263C57B5003FA924 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 95770B94263C57B5003FA924 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 95770B96263C57B5003FA924 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = MTX83R5H8X; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/StockCharts/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.StockCharts; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 95770B97263C57B5003FA924 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = MTX83R5H8X; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Sources/StockCharts/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.StockCharts; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 95770B99263C57B5003FA924 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MTX83R5H8X; + INFOPLIST_FILE = Tests/StockChartsTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.StockChartsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 95770B9A263C57B5003FA924 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = MTX83R5H8X; + INFOPLIST_FILE = Tests/StockChartsTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.StockChartsTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 95770B7B263C57B5003FA924 /* Build configuration list for PBXProject "StockCharts" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 95770B93263C57B5003FA924 /* Debug */, + 95770B94263C57B5003FA924 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 95770B95263C57B5003FA924 /* Build configuration list for PBXNativeTarget "StockCharts" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 95770B96263C57B5003FA924 /* Debug */, + 95770B97263C57B5003FA924 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 95770B98263C57B5003FA924 /* Build configuration list for PBXNativeTarget "StockChartsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 95770B99263C57B5003FA924 /* Debug */, + 95770B9A263C57B5003FA924 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 95770B78263C57B5003FA924 /* Project object */; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StockCharts.xcodeproj/project.xcworkspace/contents.xcworkspacedata Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "self:"> + </FileRef> +</Workspace>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StockCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDEDidComputeMac32BitWarning</key> + <true/> +</dict> +</plist>
Binary file StockCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StockCharts.xcodeproj/xcshareddata/xcschemes/StockCharts.xcscheme Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "1250" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "95770B80263C57B5003FA924" + BuildableName = "StockCharts.framework" + BlueprintName = "StockCharts" + ReferencedContainer = "container:StockCharts.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES"> + <Testables> + <TestableReference + skipped = "NO"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "95770B89263C57B5003FA924" + BuildableName = "StockChartsTests.xctest" + BlueprintName = "StockChartsTests" + ReferencedContainer = "container:StockCharts.xcodeproj"> + </BuildableReference> + </TestableReference> + </Testables> + </TestAction> + <LaunchAction + buildConfiguration = "Debug" + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + debugServiceExtension = "internal" + allowLocationSimulation = "YES"> + </LaunchAction> + <ProfileAction + buildConfiguration = "Release" + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + debugDocumentVersioning = "YES"> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "95770B80263C57B5003FA924" + BuildableName = "StockCharts.framework" + BlueprintName = "StockCharts" + ReferencedContainer = "container:StockCharts.xcodeproj"> + </BuildableReference> + </MacroExpansion> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/StockCharts.xcodeproj/xcuserdata/dennis.xcuserdatad/xcschemes/xcschememanagement.plist Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>SchemeUserState</key> + <dict> + <key>StockCharts.xcscheme_^#shared#^_</key> + <dict> + <key>orderHint</key> + <integer>0</integer> + </dict> + </dict> + <key>SuppressBuildableAutocreation</key> + <dict> + <key>95770B80263C57B5003FA924</key> + <dict> + <key>primary</key> + <true/> + </dict> + <key>95770B89263C57B5003FA924</key> + <dict> + <key>primary</key> + <true/> + </dict> + </dict> +</dict> +</plist>
--- a/SwiftUI-InteractiveCharts.xcodeproj/project.pbxproj Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,556 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 95075B3F26370E81005E0066 /* LineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95075B3E26370E81005E0066 /* LineView.swift */; }; - 95075B4326370EAA005E0066 /* LinePath.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95075B4226370EAA005E0066 /* LinePath.swift */; }; - 95075B472637153E005E0066 /* ChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95075B462637153E005E0066 /* ChartView.swift */; }; - 95075B4B263718C7005E0066 /* IndicatorPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95075B4A263718C7005E0066 /* IndicatorPoint.swift */; }; - 95075B4F2637227D005E0066 /* ChartLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95075B4E2637227D005E0066 /* ChartLabel.swift */; }; - 950E86C82639D7AF00509FEA /* InteractiveChartsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 950E86C62639D7AF00509FEA /* InteractiveChartsTests.swift */; }; - 950E86C92639D7AF00509FEA /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 950E86C72639D7AF00509FEA /* Info.plist */; }; - 951D9BE026375E10006B6A6D /* ChartViewPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 951D9BDF26375E10006B6A6D /* ChartViewPreview.swift */; }; - 951D9BE526375E74006B6A6D /* GenerateSampleData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 951D9BE426375E74006B6A6D /* GenerateSampleData.swift */; }; - 951D9BE926376131006B6A6D /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 951D9BE826376131006B6A6D /* ContentView.swift */; }; - 955788432636B8D800D1192D /* SwiftUI_InteractiveCharts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 955788392636B8D800D1192D /* SwiftUI_InteractiveCharts.framework */; }; - 9557884A2636B8D800D1192D /* InteractiveCharts.h in Headers */ = {isa = PBXBuildFile; fileRef = 9557883C2636B8D800D1192D /* InteractiveCharts.h */; settings = {ATTRIBUTES = (Public, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 955788442636B8D800D1192D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 955788302636B8D700D1192D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 955788382636B8D800D1192D; - remoteInfo = InteractiveCharts; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 95075B3E26370E81005E0066 /* LineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineView.swift; sourceTree = "<group>"; }; - 95075B4226370EAA005E0066 /* LinePath.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinePath.swift; sourceTree = "<group>"; }; - 95075B462637153E005E0066 /* ChartView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartView.swift; sourceTree = "<group>"; }; - 95075B4A263718C7005E0066 /* IndicatorPoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndicatorPoint.swift; sourceTree = "<group>"; }; - 95075B4E2637227D005E0066 /* ChartLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartLabel.swift; sourceTree = "<group>"; }; - 950E86C62639D7AF00509FEA /* InteractiveChartsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InteractiveChartsTests.swift; sourceTree = "<group>"; }; - 950E86C72639D7AF00509FEA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 950EFF0C2639CAB300CE1B7B /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; }; - 951D9BDF26375E10006B6A6D /* ChartViewPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChartViewPreview.swift; sourceTree = "<group>"; }; - 951D9BE426375E74006B6A6D /* GenerateSampleData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenerateSampleData.swift; sourceTree = "<group>"; }; - 951D9BE826376131006B6A6D /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; }; - 955788392636B8D800D1192D /* SwiftUI_InteractiveCharts.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftUI_InteractiveCharts.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9557883C2636B8D800D1192D /* InteractiveCharts.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InteractiveCharts.h; sourceTree = "<group>"; }; - 9557883D2636B8D800D1192D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 955788422636B8D800D1192D /* SwiftUI-InteractiveChartsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SwiftUI-InteractiveChartsTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 955788362636B8D800D1192D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9557883F2636B8D800D1192D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 955788432636B8D800D1192D /* SwiftUI_InteractiveCharts.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 95075B5426372506005E0066 /* LineChart */ = { - isa = PBXGroup; - children = ( - 95075B462637153E005E0066 /* ChartView.swift */, - 95075B552637251A005E0066 /* Helpers */, - ); - path = LineChart; - sourceTree = "<group>"; - }; - 95075B552637251A005E0066 /* Helpers */ = { - isa = PBXGroup; - children = ( - 95075B3E26370E81005E0066 /* LineView.swift */, - 95075B4226370EAA005E0066 /* LinePath.swift */, - 95075B4A263718C7005E0066 /* IndicatorPoint.swift */, - 95075B4E2637227D005E0066 /* ChartLabel.swift */, - ); - path = Helpers; - sourceTree = "<group>"; - }; - 950E86C42639D7AF00509FEA /* Tests */ = { - isa = PBXGroup; - children = ( - 950E86C52639D7AF00509FEA /* InteractiveChartsTests */, - ); - path = Tests; - sourceTree = "<group>"; - }; - 950E86C52639D7AF00509FEA /* InteractiveChartsTests */ = { - isa = PBXGroup; - children = ( - 950E86C62639D7AF00509FEA /* InteractiveChartsTests.swift */, - 950E86C72639D7AF00509FEA /* Info.plist */, - ); - path = InteractiveChartsTests; - sourceTree = "<group>"; - }; - 950EFF0D2639CC4D00CE1B7B /* Sources */ = { - isa = PBXGroup; - children = ( - 9557883B2636B8D800D1192D /* InteractiveCharts */, - ); - path = Sources; - sourceTree = "<group>"; - }; - 951D9BDE26375DDA006B6A6D /* UI Previews */ = { - isa = PBXGroup; - children = ( - 951D9BE826376131006B6A6D /* ContentView.swift */, - 951D9BDF26375E10006B6A6D /* ChartViewPreview.swift */, - 951D9BE326375E44006B6A6D /* Sample data */, - ); - path = "UI Previews"; - sourceTree = "<group>"; - }; - 951D9BE326375E44006B6A6D /* Sample data */ = { - isa = PBXGroup; - children = ( - 951D9BE426375E74006B6A6D /* GenerateSampleData.swift */, - ); - path = "Sample data"; - sourceTree = "<group>"; - }; - 9557882F2636B8D700D1192D = { - isa = PBXGroup; - children = ( - 950EFF0C2639CAB300CE1B7B /* Package.swift */, - 950EFF0D2639CC4D00CE1B7B /* Sources */, - 950E86C42639D7AF00509FEA /* Tests */, - 9557883A2636B8D800D1192D /* Products */, - ); - sourceTree = "<group>"; - }; - 9557883A2636B8D800D1192D /* Products */ = { - isa = PBXGroup; - children = ( - 955788392636B8D800D1192D /* SwiftUI_InteractiveCharts.framework */, - 955788422636B8D800D1192D /* SwiftUI-InteractiveChartsTests.xctest */, - ); - name = Products; - sourceTree = "<group>"; - }; - 9557883B2636B8D800D1192D /* InteractiveCharts */ = { - isa = PBXGroup; - children = ( - 9557883C2636B8D800D1192D /* InteractiveCharts.h */, - 9557883D2636B8D800D1192D /* Info.plist */, - 95075B5426372506005E0066 /* LineChart */, - 951D9BDE26375DDA006B6A6D /* UI Previews */, - ); - path = InteractiveCharts; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 955788342636B8D800D1192D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 9557884A2636B8D800D1192D /* InteractiveCharts.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 955788382636B8D800D1192D /* SwiftUI-InteractiveCharts */ = { - isa = PBXNativeTarget; - buildConfigurationList = 9557884D2636B8D800D1192D /* Build configuration list for PBXNativeTarget "SwiftUI-InteractiveCharts" */; - buildPhases = ( - 955788342636B8D800D1192D /* Headers */, - 955788352636B8D800D1192D /* Sources */, - 955788362636B8D800D1192D /* Frameworks */, - 955788372636B8D800D1192D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "SwiftUI-InteractiveCharts"; - productName = InteractiveCharts; - productReference = 955788392636B8D800D1192D /* SwiftUI_InteractiveCharts.framework */; - productType = "com.apple.product-type.framework"; - }; - 955788412636B8D800D1192D /* SwiftUI-InteractiveChartsTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 955788502636B8D800D1192D /* Build configuration list for PBXNativeTarget "SwiftUI-InteractiveChartsTests" */; - buildPhases = ( - 9557883E2636B8D800D1192D /* Sources */, - 9557883F2636B8D800D1192D /* Frameworks */, - 955788402636B8D800D1192D /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 955788452636B8D800D1192D /* PBXTargetDependency */, - ); - name = "SwiftUI-InteractiveChartsTests"; - productName = InteractiveChartsTests; - productReference = 955788422636B8D800D1192D /* SwiftUI-InteractiveChartsTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 955788302636B8D700D1192D /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1240; - LastUpgradeCheck = 1240; - TargetAttributes = { - 955788382636B8D800D1192D = { - CreatedOnToolsVersion = 12.4; - LastSwiftMigration = 1240; - }; - 955788412636B8D800D1192D = { - CreatedOnToolsVersion = 12.4; - }; - }; - }; - buildConfigurationList = 955788332636B8D800D1192D /* Build configuration list for PBXProject "SwiftUI-InteractiveCharts" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 9557882F2636B8D700D1192D; - productRefGroup = 9557883A2636B8D800D1192D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 955788382636B8D800D1192D /* SwiftUI-InteractiveCharts */, - 955788412636B8D800D1192D /* SwiftUI-InteractiveChartsTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 955788372636B8D800D1192D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 955788402636B8D800D1192D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 950E86C92639D7AF00509FEA /* Info.plist in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 955788352636B8D800D1192D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 95075B4326370EAA005E0066 /* LinePath.swift in Sources */, - 951D9BE526375E74006B6A6D /* GenerateSampleData.swift in Sources */, - 951D9BE926376131006B6A6D /* ContentView.swift in Sources */, - 95075B3F26370E81005E0066 /* LineView.swift in Sources */, - 951D9BE026375E10006B6A6D /* ChartViewPreview.swift in Sources */, - 95075B4B263718C7005E0066 /* IndicatorPoint.swift in Sources */, - 95075B4F2637227D005E0066 /* ChartLabel.swift in Sources */, - 95075B472637153E005E0066 /* ChartView.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9557883E2636B8D800D1192D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 950E86C82639D7AF00509FEA /* InteractiveChartsTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 955788452636B8D800D1192D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 955788382636B8D800D1192D /* SwiftUI-InteractiveCharts */; - targetProxy = 955788442636B8D800D1192D /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 9557884B2636B8D800D1192D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 9557884C2636B8D800D1192D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 14.4; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 9557884E2636B8D800D1192D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = MTX83R5H8X; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/InteractiveCharts/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.InteractiveCharts; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_WORKSPACE = YES; - }; - name = Debug; - }; - 9557884F2636B8D800D1192D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_STYLE = Automatic; - DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = MTX83R5H8X; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = Sources/InteractiveCharts/Info.plist; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.InteractiveCharts; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SKIP_INSTALL = YES; - SUPPORTS_MACCATALYST = NO; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_WORKSPACE = YES; - }; - name = Release; - }; - 955788512636B8D800D1192D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = MTX83R5H8X; - INFOPLIST_FILE = Tests/InteractiveChartsTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.InteractiveChartsTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 955788522636B8D800D1192D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = MTX83R5H8X; - INFOPLIST_FILE = Tests/InteractiveChartsTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = io.dennistech.InteractiveChartsTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 955788332636B8D800D1192D /* Build configuration list for PBXProject "SwiftUI-InteractiveCharts" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9557884B2636B8D800D1192D /* Debug */, - 9557884C2636B8D800D1192D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 9557884D2636B8D800D1192D /* Build configuration list for PBXNativeTarget "SwiftUI-InteractiveCharts" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 9557884E2636B8D800D1192D /* Debug */, - 9557884F2636B8D800D1192D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 955788502636B8D800D1192D /* Build configuration list for PBXNativeTarget "SwiftUI-InteractiveChartsTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 955788512636B8D800D1192D /* Debug */, - 955788522636B8D800D1192D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 955788302636B8D700D1192D /* Project object */; -}
--- a/SwiftUI-InteractiveCharts.xcodeproj/project.xcworkspace/contents.xcworkspacedata Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Workspace - version = "1.0"> - <FileRef - location = "self:/Users/dennis/Developer/swift/InteractiveCharts/SwiftUI-InteractiveCharts.xcodeproj"> - </FileRef> -</Workspace>
--- a/SwiftUI-InteractiveCharts.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IDEDidComputeMac32BitWarning</key> - <true/> -</dict> -</plist>
Binary file SwiftUI-InteractiveCharts.xcodeproj/project.xcworkspace/xcuserdata/dennis.xcuserdatad/UserInterfaceState.xcuserstate has changed
--- a/SwiftUI-InteractiveCharts.xcodeproj/xcuserdata/dennis.xcuserdatad/xcschemes/xcschememanagement.plist Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>SchemeUserState</key> - <dict> - <key>InteractiveCharts.xcscheme_^#shared#^_</key> - <dict> - <key>orderHint</key> - <integer>0</integer> - </dict> - <key>SwiftUI-InteractiveCharts.xcscheme_^#shared#^_</key> - <dict> - <key>orderHint</key> - <integer>0</integer> - </dict> - </dict> -</dict> -</plist>
--- a/Tests/InteractiveChartsTests/Info.plist Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>CFBundleDevelopmentRegion</key> - <string>$(DEVELOPMENT_LANGUAGE)</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>$(PRODUCT_NAME)</string> - <key>CFBundlePackageType</key> - <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleVersion</key> - <string>1</string> -</dict> -</plist>
--- a/Tests/InteractiveChartsTests/InteractiveChartsTests.swift Wed Apr 28 20:24:54 2021 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// -// InteractiveChartsTests.swift -// InteractiveChartsTests -// -// Created by Dennis Concepción Martín on 26/4/21. -// - -import XCTest -@testable import InteractiveCharts - -class InteractiveChartsTests: XCTestCase { - - override func setUpWithError() throws { - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDownWithError() throws { - // Put teardown code here. This method is called after the invocation of each test method in the class. - } - - func testExample() throws { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() throws { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Tests/StockChartsTests/Info.plist Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>$(DEVELOPMENT_LANGUAGE)</string> + <key>CFBundleExecutable</key> + <string>$(EXECUTABLE_NAME)</string> + <key>CFBundleIdentifier</key> + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>$(PRODUCT_NAME)</string> + <key>CFBundlePackageType</key> + <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Tests/StockChartsTests/StockChartsTests.swift Fri Apr 30 17:40:33 2021 +0200 @@ -0,0 +1,33 @@ +// +// StockChartsTests.swift +// StockChartsTests +// +// Created by Dennis Concepción Martín on 30/4/21. +// + +import XCTest +@testable import StockCharts + +class StockChartsTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +}