From ae00bc6a2c8123f0ec3eec95377a4deec1babfce Mon Sep 17 00:00:00 2001 From: Fornax Date: Fri, 15 Sep 2023 10:32:44 +0200 Subject: [PATCH] Fix stuttering on pages with a chart --- svelte/src/util/Chart.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/svelte/src/util/Chart.svelte b/svelte/src/util/Chart.svelte index a8c0099..c84ff89 100644 --- a/svelte/src/util/Chart.svelte +++ b/svelte/src/util/Chart.svelte @@ -60,6 +60,11 @@ onMount(() => { datasets: [], }, options: { + responsive: true, + // Only update the chart 100ms after the last time the container + // is resized. This fixes the stuttering that happens when the + // chart updates each frame + resizeDelay: 100, plugins: { legend: { display: legend,