Charts icon indicating copy to clipboard operation
Charts copied to clipboard

Update ChartDataSet.swift

Open batikansosun opened this issue 2 years ago • 2 comments

Missing method.

Xcode 14 Beta 3 issues. Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a requirement of protocol 'RangeReplaceableCollection'

Issue

Xcode 14 Beta 3 issues. Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a requirement of protocol 'RangeReplaceableCollection'

Goals :soccer:

Instance method 'replaceSubrange(_:with:)' need to adding.

Implementation Details :construction:

Added unavailable instance method 'replaceSubrange(_:with:)'.

Testing Details :mag:

batikansosun avatar Jul 07 '22 13:07 batikansosun

Nice work 🤞

dingtianran avatar Jul 08 '22 00:07 dingtianran

Thanks for the fix. I also get this compilation error on xcode 14 beta 3: Referencing instance method 'makeIterator()' on 'Collection' requires the types 'IndexingIterator<ChartData>' and 'IndexingIterator<RadarChartData>' be equivalent

Any solution to this?

The solution was actually described in "Fixes for Swift 5.7 compiler" topic:

add "as ChartData" to the lines that gives the error:

candleData as ChartData radarData as ChartData

magneroald avatar Jul 21 '22 21:07 magneroald

Thanks for the contribution!

pmairoldi avatar Aug 28 '22 00:08 pmairoldi

Can we please have this one fix back ported to 3.x ?

grangej avatar Sep 11 '22 17:09 grangej

We will not patch older versions of the library for newer Xcode versions. Your best bet is to update or fork the library.

pmairoldi avatar Sep 12 '22 19:09 pmairoldi

Can you change the minimum version to 10.0

linxiangyang112 avatar Sep 13 '22 06:09 linxiangyang112

I believe there is a technical reason behind it so we cannot. Is there a reason you still need to support such an old iOS version? The market share seems to indicate very low to 0 usage of this version https://developer.apple.com/support/app-store/

pmairoldi avatar Sep 13 '22 12:09 pmairoldi

@linxiangyang112 we use 10.3 and found a fix in the conversation here:

https://github.com/danielgindi/Charts/issues/4903

EarthHeroOrg avatar Sep 14 '22 19:09 EarthHeroOrg

Hi, did anyone know about this change, I believe that this code works before without this update.

simson2010 avatar Jun 02 '23 10:06 simson2010