mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 15:47:13 +01:00
Fixed attribution report. New metric cards. Converted ListTable.
This commit is contained in:
parent
b2aa37a3df
commit
4995a0e1e4
19 changed files with 167 additions and 288 deletions
|
|
@ -47,6 +47,7 @@ export const emptyFilter = (data: any[]) => {
|
|||
};
|
||||
|
||||
export const percentFilter = (data: any[]) => {
|
||||
if (!data) return [];
|
||||
const total = data.reduce((n, { y }) => n + y, 0);
|
||||
return data.map(({ x, y, ...props }) => ({ x, y, z: total ? (y / total) * 100 : 0, ...props }));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue