diff --git a/Charts.podspec b/Charts.podspec index 87d50ceb8a..3fa170b41d 100644 --- a/Charts.podspec +++ b/Charts.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Charts" - s.version = "3.3.4" + s.version = "3.3.4.1" 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..d04870ceda 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 1a9d235395..319b6073ca 100644 --- a/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift +++ b/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift @@ -530,6 +530,13 @@ extension ChartDataSet: RandomAccessCollection { // MARK: RangeReplaceableCollection extension ChartDataSet: RangeReplaceableCollection { + + public func replaceSubrange(_ subrange: Swift.Range, with newElements: C) where C : Collection, Element == C.Element { + entries.replaceSubrange(subrange, with: newElements) + notifyDataSetChanged() + } + + public func append(_ newElement: Element) { calcMinMax(entry: newElement) entries.append(newElement)