Skip to content

Commit dc15982

Browse files
Update reset annotation
1 parent 5c8c89e commit dc15982

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

maui/src/Charts/SfCartesianChart.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1959,6 +1959,17 @@ void ScheduleUpdateChart()
19591959

19601960
void ResetAnnotation()
19611961
{
1962+
int i = _annotationLayout.Children.Count - 1;
1963+
if (i < 0) return;
1964+
1965+
do
1966+
{
1967+
if (_annotationLayout.Children[i] is not AnnotationDrawableView view)
1968+
{
1969+
_annotationLayout.Children.RemoveAt(i);
1970+
}
1971+
i--;
1972+
} while (i >= 0);
19621973
}
19631974

19641975
void RemoveAnnotation(int index, object item)

0 commit comments

Comments
 (0)