From 9e78c6c460c7477c9d06004ff15fb3d6660a6bf3 Mon Sep 17 00:00:00 2001 From: wangyantong2000 <18745996292@163.com> Date: Wed, 14 Aug 2024 14:05:41 +0800 Subject: [PATCH] fix: the length of contributor bar --- .../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); + }, }, }, ],