diff --git a/src/Campaigns/resources/admin/components/CampaignDetailsPage/Components/GoalProgressChart/index.tsx b/src/Campaigns/resources/admin/components/CampaignDetailsPage/Components/GoalProgressChart/index.tsx index cd4d479788..eec49a17fd 100644 --- a/src/Campaigns/resources/admin/components/CampaignDetailsPage/Components/GoalProgressChart/index.tsx +++ b/src/Campaigns/resources/admin/components/CampaignDetailsPage/Components/GoalProgressChart/index.tsx @@ -8,8 +8,15 @@ import {getCampaignOptionsWindowData, amountFormatter} from '@givewp/campaigns/u const {currency} = getCampaignOptionsWindowData(); const currencyFormatter = amountFormatter(currency); -const GoalProgressChart = ({ value, goal }) => { - const percentage: number = Math.abs((value / goal) * 100); +type GoalProgressChartProps = { + value: number; + goal: number; +} + +const GoalProgressChart = ({ value, goal }: GoalProgressChartProps) => { + const progress = Math.ceil((value / goal) * 100); + const percentage = Math.min(progress, 100); + return (