Charts
Charts copied to clipboard
Failed to build Project in Xcode 14.0.1 with error of protocol 'RangeReplaceableCollection'
- [x] 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


Hi @jslabana24, I got the same issue. Have you have solutions yet?
Hay @trinhtran-markany, There are no updates for this issue from my side will let you know for sure if I get any success on it.
Is there any update to this?
any update ..?
I do a workaround by SPM instead of using cocoapod.
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 IAxisValueFormatter
with AxisValueFormatter
for example).
Is there any update?
public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element { }
Is there any update?
Is there any update?
Updating to the latest release: 4.1.0, should fix the issue. It did for me (with a couple of additional changes like replacing IAxisValueFormatter with AxisValueFormatter for example).
In Swift Package manager, I only seem to get version 3.6.0, even when removing and re-adding. Is 4.1.0 available in Swift Package Manager?
In Swift Package manager, I only seem to get version 3.6.0, even when removing and re-adding. Is 4.1.0 available in Swift Package Manager?
You should be able to by setting 4.0.0 as the next mayor version when adding the package:
After that your project should look like this:

I removed the chart pod and moved it to the swift package and it is working. I don't think you need to spend any more time on this issue. Keep it simple and focus on coding.

![]()
I removed the chart pod and moved it to the swift package and it is working. I don't think you need to spend any more time on this issue. Keep it simple and focus on coding.
![]()
it works,thank you
I still have this problem. Using Charts 4.1.0, on Mac OS Ventura 13.1, Xcode 14.2. We use CocoaPods, not SPM for this project. Is there any plan to get this working?
Same here`
![]()
I removed the chart pod and moved it to the swift package and it is working. I don't think you need to spend any more time on this issue. Keep it simple and focus on coding.
![]()
It's works form me! Thanks! ❤️