Skip to content

Commit 5d810a0

Browse files
authored
Update Charts from 3.6.0 to 4.0.3 and migrate to SPM (#7057)
2 parents 75f786a + 571369b commit 5d810a0

File tree

6 files changed

+50
-13
lines changed

6 files changed

+50
-13
lines changed

Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ target 'WooCommerce' do
6464
pod 'CocoaLumberjack', '~> 3.7.4'
6565
pod 'CocoaLumberjack/Swift', '~> 3.7.4'
6666
pod 'XLPagerTabStrip', '~> 9.0'
67-
pod 'Charts', '~> 3.6.0'
6867
pod 'ZendeskSupportSDK', '~> 5.0'
6968
pod 'StripeTerminal', '~> 2.7'
7069
pod 'Kingfisher', '~> 7.2.2'

Podfile.lock

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ PODS:
1010
- Sentry (~> 6)
1111
- Sodium (>= 0.9.1)
1212
- UIDeviceIdentifier (~> 2.0)
13-
- Charts (3.6.0):
14-
- Charts/Core (= 3.6.0)
15-
- Charts/Core (3.6.0)
1613
- CocoaLumberjack (3.7.4):
1714
- CocoaLumberjack/Core (= 3.7.4)
1815
- CocoaLumberjack/Core (3.7.4)
@@ -87,7 +84,6 @@ PODS:
8784
DEPENDENCIES:
8885
- Alamofire (~> 4.8)
8986
- Automattic-Tracks-iOS (~> 0.11.1)
90-
- Charts (~> 3.6.0)
9187
- CocoaLumberjack (~> 3.7.4)
9288
- CocoaLumberjack/Swift (~> 3.7.4)
9389
- Gridicons (~> 1.2.0)
@@ -112,7 +108,6 @@ SPEC REPOS:
112108
- Alamofire
113109
- AppAuth
114110
- Automattic-Tracks-iOS
115-
- Charts
116111
- CocoaLumberjack
117112
- FormatterKit
118113
- GoogleSignIn
@@ -150,7 +145,6 @@ SPEC CHECKSUMS:
150145
Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844
151146
AppAuth: 80317d99ac7ff2801a2f18ff86b48cd315ed465d
152147
Automattic-Tracks-iOS: 5cd49d3acf76c26b92b4094d34ba84e6b55e5425
153-
Charts: b1e3a1f5a1c9ba5394438ca3b91bd8c9076310af
154148
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
155149
FormatterKit: 184db51bf120b633693a73624a4cede89ec51a41
156150
GoogleSignIn: fd381840dbe7c1137aa6dc30849a5c3e070c034a
@@ -185,6 +179,6 @@ SPEC CHECKSUMS:
185179
ZendeskSupportProvidersSDK: 2bdf8544f7cd0fd4c002546f5704b813845beb2a
186180
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
187181

188-
PODFILE CHECKSUM: 5159eb591fc5a50785fa061b8be01bc1bca1938b
182+
PODFILE CHECKSUM: e506e3ebc3f66ec52e6682f8369507354b022d4d
189183

190184
COCOAPODS: 1.11.2

WooCommerce.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

WooCommerce/Classes/ViewRelated/Dashboard/MyStore/ChartMarker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22
import Charts
3-
3+
import UIKit
44

55
/// This class is a custom view which is displayed over a chart element (e.g. a Bar) when it is highlighted.
66
///

WooCommerce/Classes/ViewRelated/Dashboard/Stats v4/StoreStatsV4PeriodViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ private extension StoreStatsV4PeriodViewController {
374374

375375
func configureChart() {
376376
lineChartView.marker = StoreStatsChartCircleMarker()
377-
lineChartView.chartDescription?.enabled = false
377+
lineChartView.chartDescription.enabled = false
378378
lineChartView.dragXEnabled = true
379379
lineChartView.dragYEnabled = false
380380
lineChartView.setScaleEnabled(false)
@@ -482,9 +482,9 @@ private extension StoreStatsV4PeriodViewController {
482482
}
483483
}
484484

485-
// MARK: - IAxisValueFormatter Conformance (Charts)
485+
// MARK: - AxisValueFormatter Conformance (Charts)
486486
//
487-
extension StoreStatsV4PeriodViewController: IAxisValueFormatter {
487+
extension StoreStatsV4PeriodViewController: AxisValueFormatter {
488488
func stringForValue(_ value: Double, axis: AxisBase?) -> String {
489489
guard let axis = axis else {
490490
return ""
@@ -669,7 +669,7 @@ private extension StoreStatsV4PeriodViewController {
669669
let gradientColorSpace = CGColorSpaceCreateDeviceRGB()
670670
let locations: [CGFloat] = [0.0, 1.0]
671671
if let gradient = CGGradient(colorsSpace: gradientColorSpace, colors: gradientColors, locations: locations) {
672-
dataSet.fill = .init(linearGradient: gradient, angle: 90.0)
672+
dataSet.fill = LinearGradientFill(gradient: gradient, angle: 90.0)
673673
dataSet.fillAlpha = 1.0
674674
dataSet.drawFilledEnabled = true
675675
}

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@
669669
3FF314F426FD4C4A0012E68E /* BaseScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = F997172B23DBCD8E00592D8E /* BaseScreen.swift */; };
670670
3FF314F526FD4F430012E68E /* UITestsFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FF314DE26FC74450012E68E /* UITestsFoundation.framework */; };
671671
3FF314F626FD4F490012E68E /* UITestsFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FF314DE26FC74450012E68E /* UITestsFoundation.framework */; };
672+
3FFC5EAC2851942F00563C48 /* Charts in Frameworks */ = {isa = PBXBuildFile; productRef = 3FFC5EAB2851942F00563C48 /* Charts */; };
672673
4506BD712461965300FE6377 /* ProductVisibilityViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4506BD6F2461965300FE6377 /* ProductVisibilityViewController.swift */; };
673674
4506BD722461965300FE6377 /* ProductVisibilityViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4506BD702461965300FE6377 /* ProductVisibilityViewController.xib */; };
674675
4508BF622660E34A00707869 /* ShippingLabelCarrierAndRatesTopBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4508BF612660E34A00707869 /* ShippingLabelCarrierAndRatesTopBanner.swift */; };
@@ -3511,6 +3512,7 @@
35113512
isa = PBXFrameworksBuildPhase;
35123513
buildActionMask = 2147483647;
35133514
files = (
3515+
3FFC5EAC2851942F00563C48 /* Charts in Frameworks */,
35143516
D88FDB4525DD223B00CB0DBD /* Hardware.framework in Frameworks */,
35153517
263E37E12641AD8300260D3B /* Codegen in Frameworks */,
35163518
5744BEB1248FE44D000A6FE2 /* SwiftUI.framework in Frameworks */,
@@ -8141,6 +8143,7 @@
81418143
263E37E02641AD8300260D3B /* Codegen */,
81428144
45455E312657C3F300BBB0C4 /* Shimmer */,
81438145
174CA86927D90A6200126524 /* AutomatticAbout */,
8146+
3FFC5EAB2851942F00563C48 /* Charts */,
81448147
);
81458148
productName = WooCommerce;
81468149
productReference = B56DB3C62049BFAA00D4AA8E /* WooCommerce.app */;
@@ -8302,6 +8305,7 @@
83028305
3FF2247126706AA3008FFA87 /* XCRemoteSwiftPackageReference "ScreenObject" */,
83038306
3F1CA81B26C3542600228BF2 /* XCRemoteSwiftPackageReference "XCUITestHelpers" */,
83048307
174CA86827D90A6200126524 /* XCRemoteSwiftPackageReference "AutomatticAbout-swift" */,
8308+
3FFC5EAA2851942F00563C48 /* XCRemoteSwiftPackageReference "Charts" */,
83058309
);
83068310
productRefGroup = B56DB3C72049BFAA00D4AA8E /* Products */;
83078311
projectDirPath = "";
@@ -10946,6 +10950,14 @@
1094610950
minimumVersion = 0.2.0;
1094710951
};
1094810952
};
10953+
3FFC5EAA2851942F00563C48 /* XCRemoteSwiftPackageReference "Charts" */ = {
10954+
isa = XCRemoteSwiftPackageReference;
10955+
repositoryURL = "https://github.com/danielgindi/Charts";
10956+
requirement = {
10957+
kind = upToNextMajorVersion;
10958+
minimumVersion = 4.0.3;
10959+
};
10960+
};
1094910961
45455E302657C3F300BBB0C4 /* XCRemoteSwiftPackageReference "SwiftUI-Shimmer" */ = {
1095010962
isa = XCRemoteSwiftPackageReference;
1095110963
repositoryURL = "https://github.com/markiv/SwiftUI-Shimmer";
@@ -11005,6 +11017,11 @@
1100511017
package = 3F1CA81B26C3542600228BF2 /* XCRemoteSwiftPackageReference "XCUITestHelpers" */;
1100611018
productName = XCUITestHelpers;
1100711019
};
11020+
3FFC5EAB2851942F00563C48 /* Charts */ = {
11021+
isa = XCSwiftPackageProductDependency;
11022+
package = 3FFC5EAA2851942F00563C48 /* XCRemoteSwiftPackageReference "Charts" */;
11023+
productName = Charts;
11024+
};
1100811025
45455E312657C3F300BBB0C4 /* Shimmer */ = {
1100911026
isa = XCSwiftPackageProductDependency;
1101011027
package = 45455E302657C3F300BBB0C4 /* XCRemoteSwiftPackageReference "SwiftUI-Shimmer" */;

0 commit comments

Comments
 (0)