I am facing following errors in library -
Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'
Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a requirement of protocol 'RangeReplaceableCollection'.
CodePudding user response:
Append it to extension ChartDataSet: RangeReplaceableCollection
public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C : Collection, ChartDataEntry == C.Element {
entries.replaceSubrange(subrange, with: newElements)
notifyDataSetChanged()
}