mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Events table.
This commit is contained in:
parent
2addb96e4b
commit
5206622d5a
13 changed files with 131 additions and 31 deletions
|
|
@ -124,5 +124,5 @@ export const countryFilter = data =>
|
|||
|
||||
export const percentFilter = data => {
|
||||
const total = data.reduce((n, { y }) => n + y, 0);
|
||||
return data.map(({ x, y }) => ({ x, y, z: total ? (y / total) * 100 : 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