Charts: Failed to build Project in Xcode 14.0.1 with error of protocol 'RangeReplaceableCollection'
- I’ve read, understood, and done my best to follow the *CONTRIBUTING guidelines.
What did you do?
installed pod ‘Charts’ and it’s not building, showing an error
Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'
ℹ Please replace this with what you did.
just install the latest version of the library (pod) and build the project
What did you expect to happen?
should successfully build the project.
ℹ Please replace this with what you expected to happen.
build project successfully.
What happened instead?
showing error Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'
Charts Environment
Charts version/Branch/Commit Number: 3.6 Xcode version: 14.0.1 Swift version: iOS 16 Platform(s) running Charts: - macOS version running Xcode: macOS Monterey v12.6
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 18
public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element { }
As an alternative, updating to the latest release: 4.1.0, should also fix the issue. It did for me (with a couple of additional changes like replacing
IAxisValueFormatterwithAxisValueFormatterfor example).