From 7a7d603fd48fb5c8fc41383c9f6e54b664c40d7a Mon Sep 17 00:00:00 2001 From: Jack Date: Thu, 8 Apr 2021 18:10:34 +0100 Subject: [PATCH] added funbox watermark to the graph --- src/js/test/test-logic.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/js/test/test-logic.js b/src/js/test/test-logic.js index ad4d94a2a..a6a18cbbb 100644 --- a/src/js/test/test-logic.js +++ b/src/js/test/test-logic.js @@ -1708,6 +1708,33 @@ export function finish(difficultyFailed = false) { $("#result .stats .source").addClass("hidden"); } + if (Funbox.active !== "none") { + ChartController.result.options.annotation.annotations.push({ + enabled: false, + type: "line", + mode: "horizontal", + scaleID: "wpm", + value: 0, + borderColor: "transparent", + borderWidth: 1, + borderDash: [2, 2], + label: { + backgroundColor: "transparent", + fontFamily: Config.fontFamily.replace(/_/g, " "), + fontSize: 11, + fontStyle: "normal", + fontColor: ThemeColors.sub, + xPadding: 6, + yPadding: 6, + cornerRadius: 3, + position: "left", + enabled: true, + content: `${Funbox.active}`, + yAdjust: -11, + }, + }); + } + ChartController.result.options.scales.yAxes[0].ticks.max = maxChartVal; ChartController.result.options.scales.yAxes[1].ticks.max = maxChartVal;