Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fix Revenue country sums error Closes #3769

Francis Caoffa97d34e213
diff --git a/src/app/(main)/websites/[websiteId]/(reports)/revenue/Revenue.tsx b/src/app/(main)/websites/[websiteId]/(reports)/revenue/Revenue.tsx
index c56eca68d..a5d3b1011 100644
--- a/src/app/(main)/websites/[websiteId]/(reports)/revenue/Revenue.tsx
+++ b/src/app/(main)/websites/[websiteId]/(reports)/revenue/Revenue.tsx
@@ -137,7 +137,7 @@ export function Revenue({ websiteId, startDate, endDate, unit }: RevenueProps) {
metric={formatMessage(labels.revenue)}
data={data?.country.map(({ name, value }: { name: string; value: number }) => ({
label: name,
- count: value,
+ count: Number(value),
percent: (value / data?.total.sum) * 100,
}))}
currency={currency}