We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 82271c7 + 04aeec5 commit ab66734Copy full SHA for ab66734
Source/Charts/Renderers/LineChartRenderer.swift
@@ -760,6 +760,12 @@ open class LineChartRenderer: LineRadarRenderer
760
761
for high in indices
762
{
763
+ // When updating the data set for the chart and then animating it, sometimes highlights are generated for the
764
+ // removed sets. This guard prevents OOB in the case where the new set has less data than the old set
765
+ if high.dataSetIndex >= lineData._dataSets.count - 1 {
766
+ continue
767
+ }
768
+
769
guard let set = lineData[high.dataSetIndex] as? LineChartDataSetProtocol,
770
set.isHighlightEnabled
771
else { continue }
0 commit comments