mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-06 07:25:18 +08:00
added funbox watermark to the graph
This commit is contained in:
parent
de866e895a
commit
7a7d603fd4
1 changed files with 27 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue