diff --git a/AppImage/components/latency-detail-modal.tsx b/AppImage/components/latency-detail-modal.tsx index 94fbfdf2..2c13f0b5 100644 --- a/AppImage/components/latency-detail-modal.tsx +++ b/AppImage/components/latency-detail-modal.tsx @@ -170,9 +170,17 @@ const generateLatencyReport = (report: ReportData) => { endTime: new Date(report.data[report.data.length - 1].timestamp * 1000).toLocaleString(), } : null - // Generate chart SVG - const chartData = report.isRealtime - ? report.realtimeResults.map(r => r.latency_avg || 0) + // Generate chart SVG - expand realtime to all 3 values (min, avg, max) per sample + const chartData = report.isRealtime + ? report.realtimeResults.flatMap(r => { + const points: number[] = [] + if (r.latency_min !== null) points.push(r.latency_min) + if (r.latency_avg !== null && r.latency_avg !== r.latency_min && r.latency_avg !== r.latency_max) { + points.push(r.latency_avg) + } + if (r.latency_max !== null) points.push(r.latency_max) + return points.length > 0 ? points : [r.latency_avg ?? 0] + }) : report.data.map(d => d.value || 0) let chartSvg = '
Not enough data points for chart
' @@ -695,11 +703,10 @@ ${report.isRealtime && report.realtimeResults.length > 0 ? `