From 86d27b25557fb2e3ce9e01d4834314677ad70df7 Mon Sep 17 00:00:00 2001 From: Michael Woolnough Date: Mon, 20 Jan 2025 10:22:49 +0000 Subject: [PATCH] Force React to not diff the scatter-plot and just re-render the whole thing --- server/static/wrstat/src/Scatter.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/static/wrstat/src/Scatter.tsx b/server/static/wrstat/src/Scatter.tsx index bd8a4fd..1ddb3ec 100644 --- a/server/static/wrstat/src/Scatter.tsx +++ b/server/static/wrstat/src/Scatter.tsx @@ -49,6 +49,8 @@ type Data = { Mtime: string; } +let scatterKey = 0; + const minDaysAgo = (date: string) => { const daysAgo = asDaysAgo(date); if (daysAgo < 0) { @@ -232,7 +234,7 @@ const minDaysAgo = (date: string) => { const xScale = graphWidth / (maxDate - minDate), yScale = graphHeight / (maxSize - minSize); - return + return