Charts
Charts copied to clipboard
Not able to compile code on Xcode 14 Beta 3
What did you do?
ℹ I have Updated pods after Xcode and macOS update
What did you expect to happen?
ℹ It should compile the code on Xcode 14 Beta 3 and with iOS 16
What happened instead?
ℹ I am facing following errors in library -
- Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'
- Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a requirement of protocol 'RangeReplaceableCollection'
- Referencing instance method 'makeIterator()' on 'Collection' requires the types 'IndexingIterator<ChartData>' and 'IndexingIterator<RadarChartData>' be equivalent
Charts Environment
Charts version/Branch/Commit Number: 4.0.3 Xcode version: 14.0 Beta 3 Swift version: 5.0 Platform(s) running Charts: - macOS version running Xcode: Ventura 13.0 Beta
Facing same issue.
Also hit this issue. I wonder whether this is related to this Swift bug? https://github.com/apple/swift/issues/60085
It occurs with Beta 4 released today as well...
workaround or patch:
append it to extension ChartDataSet: RangeReplaceableCollection
public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element {
entries.replaceSubrange(subrange, with: newElements)
notifyDataSetChanged()
}
have older issue after ))))))
which also can fix, but move from CocoaPods to SPM Package :)
@iDevPro
Thanks for the solution. It Works for me.
But now I am facing another issue :
Referencing instance method 'makeIterator()' on 'Collection' requires the types 'IndexingIterator<ChartData>' and 'IndexingIterator<RadarChartData>' be equivalent
Please help me if anyone has any solution for this
Charts Environment: -
Charts version/Branch/Commit Number: 4.0.3 Xcode version: 14.0 Beta 3 Swift version: 5.0 Platform(s) running Charts: - macOS version running Xcode: Ventura 13.0 Beta
Duplicate of #4860 ?
Facing the same issue
The same issue here.
Casting the data object to ChartData seems to resolve the "makeIterator" compile errors. I haven't confirmed that the code runs correctly.
for case let set as RadarChartDataSetProtocol in radarData as ChartData where set.isVisible
The solutions to this problem have been merged into the master branch. However, no new version has been released. So you can use it like
pod 'Charts', :git => 'https://github.com/danielgindi/Charts.git', :branch => 'master' @josipbernat @doshirj @Nikojoel
The solutions to this problem have been merged into the master branch. However, no new version has been released. So you can use it like
pod 'Charts', :git => 'https://github.com/danielgindi/Charts.git', :branch => 'master' @josipbernat @doshirj @Nikojoel
Great
September 12, Xcode 14.0
How to fix this?
Can we cut a new release now?
I've fixed this https://github.com/danielgindi/Charts/pull/4861
closed by https://github.com/danielgindi/Charts/releases/tag/v4.1.0
workaround or patch: append it to
extension ChartDataSet: RangeReplaceableCollection
public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element { entries.replaceSubrange(subrange, with: newElements) notifyDataSetChanged() }
have older issue after ))))))
which also can fix, but move from CocoaPods to SPM Package :)
thanks so much bro for your help
This was fixed in Charts pod 4.1.0
This was fixed in Charts pod 4.1.0
how to update Charts pod to 4.1.0. I try "pod update Charts" but not oke, current version is 3.6.0. i try change in podfile.lock but show error "react-native-charts-wrapper (from ../node_modules/react-native-charts-wrapper
) was resolved to 0.5.9, which depends on
Charts (= 3.6.0)"
Check the platform version in your podfile, update it to 15 and then try pod update again
platform :ios, '15.0'
This was fixed in Charts pod 4.1.0
how to update Charts pod to 4.1.0. I try "pod update Charts" but not oke, current version is 3.6.0. i try change in podfile.lock but show error "react-native-charts-wrapper (from
../node_modules/react-native-charts-wrapper
) was resolved to 0.5.9, which depends on Charts (= 3.6.0)"
Check the platform version in your podfile, update it to 15 and then try pod update again
platform :ios, '15.0'
This was fixed in Charts pod 4.1.0
how to update Charts pod to 4.1.0. I try "pod update Charts" but not oke, current version is 3.6.0. i try change in podfile.lock but show error "react-native-charts-wrapper (from
../node_modules/react-native-charts-wrapper
) was resolved to 0.5.9, which depends on Charts (= 3.6.0)"
tks you, but not ok, then pod update, charts having version is 3.6.0 and error above :(((, another solution??. i usse react native 0.63.2
The solution I provided works for iOS native app, I don't know if same applies to react native
This was fixed in Charts pod 4.1.0
how to update Charts pod to 4.1.0. I try "pod update Charts" but not oke, current version is 3.6.0. i try change in podfile.lock but show error "react-native-charts-wrapper (from
../node_modules/react-native-charts-wrapper
) was resolved to 0.5.9, which depends on Charts (= 3.6.0)"
https://github.com/wuxudong/react-native-charts-wrapper/issues/894
pod 'Charts', '~> 4.1.0'
It fixes my issues but it creates few more for my project, like
- Cannot find type 'IAxisValueFormatter' in scope
- Cannot use optional chaining on non-optional value of type 'Description'
Replace IAxisValueFormatter with AxisValueFormatter Removed ? or just follow Xcode suggestion
pod 'Charts', '~> 4.1.0'
It fixes my issues but it creates few more for my project, like
- Cannot find type 'IAxisValueFormatter' in scope
- Cannot use optional chaining on non-optional value of type 'Description'
Replace IAxisValueFormatter with AxisValueFormatter Removed ? or just follow Xcode suggestion
I'm having this same issue
Well solution available on the following link, Worked for me
https://stackoverflow.com/questions/74010925/charts-not-compile-on-xcode-14
I meet the same issue, update to 4.1.0 create a few more errors.