diff --git a/README.md b/README.md index dcc6865fc..08648c0a7 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,18 @@

- GitHub Release - MIT License - Build Status - Umami Demo + + GitHub Release + + + MIT License + + + Build Status + + + Umami Demo +

--- @@ -111,10 +119,18 @@ docker compose up --force-recreate -d ## 🛟 Support

- GitHub - Twitter - LinkedIn - Discord + + GitHub + + + Twitter + + + LinkedIn + + + Discord +

[release-shield]: https://img.shields.io/github/release/umami-software/umami.svg diff --git a/src/components/metrics/RealtimeChart.tsx b/src/components/metrics/RealtimeChart.tsx index f42b96da2..a43dcb429 100644 --- a/src/components/metrics/RealtimeChart.tsx +++ b/src/components/metrics/RealtimeChart.tsx @@ -16,7 +16,6 @@ export function RealtimeChart({ data, unit, ...props }: RealtimeChartProps) { const endDate = startOfMinute(new Date()); const startDate = subMinutes(endDate, REALTIME_RANGE); const prevEndDate = useRef(endDate); - const prevData = useRef(null); const chartData = useMemo(() => { if (!data) { @@ -29,22 +28,14 @@ export function RealtimeChart({ data, unit, ...props }: RealtimeChartProps) { }; }, [data, startDate, endDate, unit]); + // Don't animate the bars shifting over because it looks weird const animationDuration = useMemo(() => { - // Don't animate the bars shifting over because it looks weird if (isBefore(prevEndDate.current, endDate)) { prevEndDate.current = endDate; return 0; } - - // Don't animate when data hasn't changed - const serialized = JSON.stringify(chartData); - if (prevData.current === serialized) { - return 0; - } - prevData.current = serialized; - return DEFAULT_ANIMATION_DURATION; - }, [endDate, chartData]); + }, [endDate]); return (