From 839e8e1dedfa0461ec1405e431187c6549c781f5 Mon Sep 17 00:00:00 2001 From: Adam Slattum Date: Thu, 15 Sep 2022 12:51:30 -0400 Subject: [PATCH] fix xcode 14 build issues and upgrade to 3.6 --- Charts.podspec | 2 +- Source/Charts/Animation/ChartAnimationEasing.swift | 2 +- .../Charts/Data/Implementations/Standard/ChartDataSet.swift | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Charts.podspec b/Charts.podspec index a8aceeb93c..dd6de42655 100644 --- a/Charts.podspec +++ b/Charts.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Charts" - s.version = "3.5.6" + s.version = "3.6" s.summary = "Charts is a powerful & easy to use chart library for iOS, tvOS and OSX (and Android)" s.homepage = "https://github.com/danielgindi/Charts" s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE" } diff --git a/Source/Charts/Animation/ChartAnimationEasing.swift b/Source/Charts/Animation/ChartAnimationEasing.swift index 58b0b632d8..a6453d9e0c 100644 --- a/Source/Charts/Animation/ChartAnimationEasing.swift +++ b/Source/Charts/Animation/ChartAnimationEasing.swift @@ -341,7 +341,7 @@ internal struct EasingFunctions let s: TimeInterval = 1.70158 var position: TimeInterval = elapsed / duration position -= 1.0 - return Double( position * position * ((s + 1.0) * position + s) + 1.0 ) + return Double( position * position * ((s + Double(1.0)) * position + s) + Double(1.0) ) } internal static let EaseInOutBack = { (elapsed: TimeInterval, duration: TimeInterval) -> Double in diff --git a/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift b/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift index 9922878da8..6cea51abf5 100644 --- a/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift @@ -571,4 +571,9 @@ extension ChartDataSet: RangeReplaceableCollection { entries.removeAll(keepingCapacity: keepCapacity) notifyDataSetChanged() } + + public func replaceSubrange(_ subrange: Swift.Range, with newElements: C) where C : Collection, ChartDataEntry == C.Element { + entries.replaceSubrange(subrange, with: newElements) + notifyDataSetChanged() + } }