mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 04:25:39 +01:00
percent
This commit is contained in:
parent
2660c44a6a
commit
dfb45a0795
2 changed files with 6 additions and 3 deletions
|
|
@ -38,7 +38,6 @@ export function WebsiteMetricsBar({
|
|||
const { pageviews, visitors, visits, bounces, totaltime } = data || {};
|
||||
const optionsNumber: FormatNumberOptions = { notation: 'compact', maximumSignificantDigits: 3 };
|
||||
const optionsSmallNumber: FormatNumberOptions = { notation: 'compact' };
|
||||
const optionsPercent: FormatNumberOptions = { style: 'percent' };
|
||||
|
||||
const metrics = data
|
||||
? [
|
||||
|
|
@ -70,7 +69,7 @@ export function WebsiteMetricsBar({
|
|||
change:
|
||||
(Math.min(visits.value, bounces.value) / visits.value) * 100 -
|
||||
(Math.min(visits.prev, bounces.prev) / visits.prev) * 100,
|
||||
formatValue: (n: number) => intl.formatNumber(+n / 100, optionsPercent),
|
||||
formatValue: (n: number) => intl.formatNumber(+n / 100, { style: 'percent' }),
|
||||
reverseColors: true,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue