Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Source/Charts/Renderers/LineChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,12 @@ open class LineChartRenderer: LineRadarRenderer

for high in indices
{
// When updating the data set for the chart and then animating it, sometimes highlights are generated for the
// removed sets. This guard prevents OOB in the case where the new set has less data than the old set
if high.dataSetIndex >= lineData._dataSets.count - 1 {
continue
}

guard let set = lineData[high.dataSetIndex] as? LineChartDataSetProtocol,
set.isHighlightEnabled
else { continue }
Expand Down