From 5c0eb4d0a3f22de1e1c2ef0b8f21d393ed43d6c4 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sat, 26 Mar 2022 00:19:33 +0100 Subject: [PATCH] result graph fix --- frontend/src/scripts/test/result.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/scripts/test/result.ts b/frontend/src/scripts/test/result.ts index cbf1dc6e1..5dd337c8b 100644 --- a/frontend/src/scripts/test/result.ts +++ b/frontend/src/scripts/test/result.ts @@ -28,10 +28,10 @@ export function toggleUnsmoothedRaw(): void { Notifications.add(useUnsmoothedRaw ? "on" : "off", 1); } -const resultAnnotation = ( +let resultAnnotation = ( ChartController.result.options as PluginChartOptions<"line" | "scatter"> ).plugins.annotation.annotations as AnnotationOptions<"line">[]; -const resultScaleOptions = ( +let resultScaleOptions = ( ChartController.result.options as ScaleChartOptions<"line" | "scatter"> ).scales; @@ -594,6 +594,12 @@ export async function update( randomQuote: MonkeyTypes.Quote, dontSave: boolean ): Promise { + resultScaleOptions = ( + ChartController.result.options as ScaleChartOptions<"line" | "scatter"> + ).scales; + resultAnnotation = ( + ChartController.result.options as PluginChartOptions<"line" | "scatter"> + ).plugins.annotation.annotations as AnnotationOptions<"line">[]; result = res; $("#result #resultWordsHistory").addClass("hidden"); $("#retrySavingResultButton").addClass("hidden");