diff --git a/apps/dashboard/lib/charts/useTooltip.ts b/apps/dashboard/lib/charts/useTooltip.ts index 9fbed6ddc3..89f9bf89ec 100644 --- a/apps/dashboard/lib/charts/useTooltip.ts +++ b/apps/dashboard/lib/charts/useTooltip.ts @@ -23,7 +23,9 @@ export function useTooltip({ snapToX = true, }: TooltipOptions): ChartTooltipContext { const { series, data, xScale, yScale, margin } = chartContext; - + if (data.length === 0) { + return {} as ChartTooltipContext; + } const visxTooltipInPortal = useTooltipInPortal({ scroll: true, detectBounds: true,