From 2c5289028d322b890c3be2ecb4e358fb0745472c Mon Sep 17 00:00:00 2001 From: Leon Sorokin Date: Thu, 18 Jan 2024 08:34:28 -0600 Subject: [PATCH] AnnotationsPlugin2: Skip zero-length, field-less, and time-less frames (#80810) --- .../plugins/panel/timeseries/plugins/AnnotationsPlugin2.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin2.tsx b/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin2.tsx index 2ae4b1ad460..32b6da49ca8 100644 --- a/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin2.tsx +++ b/public/app/plugins/panel/timeseries/plugins/AnnotationsPlugin2.tsx @@ -69,7 +69,9 @@ export const AnnotationsPlugin2 = ({ const getColorByName = useTheme2().visualization.getColorByName; const annos = useMemo(() => { - let annos = annotations.filter((frame) => frame.name !== 'exemplar'); + let annos = annotations.filter( + (frame) => frame.name !== 'exemplar' && frame.length > 0 && frame.fields.some((f) => f.name === 'time') + ); if (newRange) { let isRegion = newRange.to > newRange.from;