From cb9c0857352ff5e8e047d0e7e6cb967f01fd8122 Mon Sep 17 00:00:00 2001 From: wangyantong <135088663+wangyantong2000@users.noreply.github.com> Date: Tue, 20 Aug 2024 09:05:32 +0800 Subject: [PATCH] fix: reserved digits for the length of the contributor bar (#861) --- .../ContentScripts/features/repo-activity-racing-bar/data.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/ContentScripts/features/repo-activity-racing-bar/data.ts b/src/pages/ContentScripts/features/repo-activity-racing-bar/data.ts index 64bb22f9..f31ebdfc 100644 --- a/src/pages/ContentScripts/features/repo-activity-racing-bar/data.ts +++ b/src/pages/ContentScripts/features/repo-activity-racing-bar/data.ts @@ -154,11 +154,13 @@ export const getOption = async ( }, label: { show: true, - precision: 1, position: 'right', valueAnimation: true, fontFamily: 'monospace', color: theme === 'light' ? undefined : DARK_TEXT_COLOR, + formatter: function (params: any) { + return params.data.value[1].toFixed(2); + }, }, }, ],