mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +01:00
Fix for schema selection in pg adapter.
Some checks are pending
Node.js CI / build (postgresql, 18.18) (push) Waiting to run
Some checks are pending
Node.js CI / build (postgresql, 18.18) (push) Waiting to run
This commit is contained in:
parent
366c52d703
commit
e610de383a
6 changed files with 22 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
export const percentFilter = (data: any[]) => {
|
||||
if (!data) return [];
|
||||
if (!Array.isArray(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