result graph fix

This commit is contained in:
Miodec 2022-03-26 00:19:33 +01:00
parent 28ff1a3e42
commit 5c0eb4d0a3

View file

@ -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<void> {
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");