Skip to content

Commit

Permalink
Update ChartDataSet.swift
Browse files Browse the repository at this point in the history
Missing method.
  • Loading branch information
batikansosun authored Jul 7, 2022
1 parent b38b8d4 commit 9e4c77c
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 9e4c77c

Please sign in to comment.