Charts icon indicating copy to clipboard operation
Charts copied to clipboard

iOS 15 Crash has been fixed.

Open ekucet opened this issue 2 years ago • 1 comments

Issue Link :link:

If you want all the pies to be highlighted in the piechart, you will get an error in ios 15. Cannot convert NSArray to Swift Array.

var highlights: [Highlight] = []
for i in 0 ..< entries.count {
    let highlight = Highlight(x: Double(i), y: Const.highlightYValue, dataSetIndex: Const.highlightDataSetIndex)
    highlights.append(highlight)
}        
pieChartView.highlightValues(highlights)

Used compactMap to cast NSArray to Swift Array.

Goals :soccer:

None

Implementation Details :construction:

None

Testing Details :mag:

None

ekucet avatar Jan 09 '23 07:01 ekucet

Needs a reproducible project. You can always map before passing the array to our function.

pmairoldi avatar Jun 08 '23 17:06 pmairoldi