Skip to content

Commit

Permalink
Merge pull request ChartsOrg#4861 from batikansosun/batikansosun-patch-1
Browse files Browse the repository at this point in the history
Update ChartDataSet.swift
  • Loading branch information
pmairoldi authored Aug 28, 2022
2 parents 79cfb9a + 9e4c77c commit 130b505
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ extension ChartDataSet: RandomAccessCollection {

// MARK: RangeReplaceableCollection
extension ChartDataSet: RangeReplaceableCollection {
public func replaceSubrange<C>(_ subrange: Swift.Range<Index>, 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)
Expand Down

0 comments on commit 130b505

Please sign in to comment.