Skip to content

Commit 2ddcf11

Browse files
committed
Update Charts from 3.6.0 to 4.0.3 via CocoaPods
Next, we'll move it to Swift Package Manager, to make progress on running the app on Xcode 14.0. The upgrade also required to: - Rename `IAxisValueFormatter` to `AxisValueFormatter` - Update a `Description` access now that it's no longer `Optional` - Update a `.fill` assignment to match new types modeling See ChartsOrg/Charts@v3.6.0...v4.0.3
1 parent 75f786a commit 2ddcf11

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ 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'
67+
pod 'Charts', '~> 4.0'
6868
pod 'ZendeskSupportSDK', '~> 5.0'
6969
pod 'StripeTerminal', '~> 2.7'
7070
pod 'Kingfisher', '~> 7.2.2'

Podfile.lock

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ 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)
13+
- Charts (4.0.3):
14+
- Charts/Core (= 4.0.3)
15+
- Charts/Core (4.0.3):
16+
- SwiftAlgorithms (~> 1.0)
1617
- CocoaLumberjack (3.7.4):
1718
- CocoaLumberjack/Core (= 3.7.4)
1819
- CocoaLumberjack/Core (3.7.4)
@@ -41,6 +42,7 @@ PODS:
4142
- Sourcery (1.0.3)
4243
- StripeTerminal (2.7.0)
4344
- SVProgressHUD (2.2.5)
45+
- SwiftAlgorithms (1.0.0)
4446
- UIDeviceIdentifier (2.0.0)
4547
- WordPress-Aztec-iOS (1.11.0)
4648
- WordPress-Editor-iOS (1.11.0):
@@ -87,7 +89,7 @@ PODS:
8789
DEPENDENCIES:
8890
- Alamofire (~> 4.8)
8991
- Automattic-Tracks-iOS (~> 0.11.1)
90-
- Charts (~> 3.6.0)
92+
- Charts (~> 4.0)
9193
- CocoaLumberjack (~> 3.7.4)
9294
- CocoaLumberjack/Swift (~> 3.7.4)
9395
- Gridicons (~> 1.2.0)
@@ -128,6 +130,7 @@ SPEC REPOS:
128130
- Sourcery
129131
- StripeTerminal
130132
- SVProgressHUD
133+
- SwiftAlgorithms
131134
- UIDeviceIdentifier
132135
- WordPress-Aztec-iOS
133136
- WordPress-Editor-iOS
@@ -150,7 +153,7 @@ SPEC CHECKSUMS:
150153
Alamofire: 3ec537f71edc9804815215393ae2b1a8ea33a844
151154
AppAuth: 80317d99ac7ff2801a2f18ff86b48cd315ed465d
152155
Automattic-Tracks-iOS: 5cd49d3acf76c26b92b4094d34ba84e6b55e5425
153-
Charts: b1e3a1f5a1c9ba5394438ca3b91bd8c9076310af
156+
Charts: d959d6723c8eedfdd0735dfc28cb0a71762ac4d9
154157
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
155158
FormatterKit: 184db51bf120b633693a73624a4cede89ec51a41
156159
GoogleSignIn: fd381840dbe7c1137aa6dc30849a5c3e070c034a
@@ -166,6 +169,7 @@ SPEC CHECKSUMS:
166169
Sourcery: 70a6048014bd4f37ea80e6bd4354d47bf3b760e1
167170
StripeTerminal: 237b759168a00c7f55b97c743cd8a4921866c46b
168171
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
172+
SwiftAlgorithms: 38dda4731d19027fdeee1125f973111bf3386b53
169173
UIDeviceIdentifier: af4e11e25a2ea670078e2bd677bb0e8144f9f063
170174
WordPress-Aztec-iOS: 050b34d4c3adfb7c60363849049b13d60683b348
171175
WordPress-Editor-iOS: 304098424f1051cb271546c99f906aac296b1b81
@@ -185,6 +189,6 @@ SPEC CHECKSUMS:
185189
ZendeskSupportProvidersSDK: 2bdf8544f7cd0fd4c002546f5704b813845beb2a
186190
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
187191

188-
PODFILE CHECKSUM: 5159eb591fc5a50785fa061b8be01bc1bca1938b
192+
PODFILE CHECKSUM: 663aea2da9c51e9d79910b4fe455dd587df6324b
189193

190194
COCOAPODS: 1.11.2

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
}

0 commit comments

Comments
 (0)