Skip to content

Commit

Permalink
Update ChartDataSet.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
pandaiios9 authored Sep 14, 2022
1 parent 6654640 commit 02fff8e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,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 02fff8e

Please sign in to comment.