diff --git a/apps/web/src/components/ui/report/elements/MetricElement/MetricContent.tsx b/apps/web/src/components/ui/report/elements/MetricElement/MetricContent.tsx index cf4f85262..4b1f0b662 100644 --- a/apps/web/src/components/ui/report/elements/MetricElement/MetricContent.tsx +++ b/apps/web/src/components/ui/report/elements/MetricElement/MetricContent.tsx @@ -25,11 +25,15 @@ export const MetricContent = React.memo( const reportId = useChatLayoutContextSelector((x) => x.reportId) || ''; const reportVersionNumber = useChatLayoutContextSelector((x) => x.reportVersionNumber); const ref = useRef(null); + const hasBeenInViewport = useRef(false); const [inViewport] = useInViewport(ref, { threshold: 0.33 }); - const renderChart = inViewport || isExportMode; + if (inViewport && !hasBeenInViewport.current) { + hasBeenInViewport.current = true; + } + const renderChart = inViewport || isExportMode || hasBeenInViewport.current; const { data: metric,