From c3504e42e00a9029a6270176b1db98d47cc03ea7 Mon Sep 17 00:00:00 2001 From: "MSI\\User" Date: Tue, 9 Apr 2024 14:46:31 +0800 Subject: [PATCH] format number in chart --- .../CompanyTeamCashFlow/CompanyTeamCashFlow.tsx | 10 ++++++++++ src/components/ProjectCashFlow/ProjectCashFlow.tsx | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/components/CompanyTeamCashFlow/CompanyTeamCashFlow.tsx b/src/components/CompanyTeamCashFlow/CompanyTeamCashFlow.tsx index 6d255a4..aeeeaf2 100644 --- a/src/components/CompanyTeamCashFlow/CompanyTeamCashFlow.tsx +++ b/src/components/CompanyTeamCashFlow/CompanyTeamCashFlow.tsx @@ -160,6 +160,11 @@ const CompanyTeamCashFlow: React.FC = () => { min: 0, max: 3700000, tickAmount: 5, + labels: { + formatter: function (val) { + return val.toLocaleString() + } + } }, { show: false, @@ -180,6 +185,11 @@ const CompanyTeamCashFlow: React.FC = () => { min: 0, max: 21000000, tickAmount: 5, + labels: { + formatter: function (val) { + return val.toLocaleString() + } + } }, { show: false, diff --git a/src/components/ProjectCashFlow/ProjectCashFlow.tsx b/src/components/ProjectCashFlow/ProjectCashFlow.tsx index 5eb455c..ea71833 100644 --- a/src/components/ProjectCashFlow/ProjectCashFlow.tsx +++ b/src/components/ProjectCashFlow/ProjectCashFlow.tsx @@ -152,6 +152,11 @@ const ProjectCashFlow: React.FC = () => { min: 0, max: 350000, tickAmount: 5, + labels: { + formatter: function (val) { + return val.toLocaleString() + } + } }, { show: false, @@ -172,6 +177,11 @@ const ProjectCashFlow: React.FC = () => { min: 0, max: 850000, tickAmount: 5, + labels: { + formatter: function (val) { + return val.toLocaleString() + } + } }, { show: false,