diff --git a/frontend/src/lib/uPlotLib/utils/getUplotChartData.ts b/frontend/src/lib/uPlotLib/utils/getUplotChartData.ts index 695b2c07de..1e224da05a 100644 --- a/frontend/src/lib/uPlotLib/utils/getUplotChartData.ts +++ b/frontend/src/lib/uPlotLib/utils/getUplotChartData.ts @@ -9,10 +9,12 @@ import { generateColor } from './generateColor'; function getXAxisTimestamps(seriesList: QueryData[]): number[] { const timestamps = new Set(); - seriesList.forEach((series: { values: [number, string][] }) => { - series.values.forEach((value) => { - timestamps.add(value[0]); - }); + seriesList.forEach((series: { values?: [number, string][] }) => { + if (series?.values) { + series.values.forEach((value) => { + timestamps.add(value[0]); + }); + } }); const timestampsArr: number[] | unknown[] = Array.from(timestamps) || [];