mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 15:23:38 +01:00
refactor(filter): remove now obsolete filters
This commit is contained in:
parent
ba4272c878
commit
06f24b0c90
@ -113,12 +113,7 @@ export const refFilter = (data, { domain, domainOnly, raw }) => {
|
|||||||
return Object.keys(map).map(key => ({ x: key, y: map[key], w: links[key] }));
|
return Object.keys(map).map(key => ({ x: key, y: map[key], w: links[key] }));
|
||||||
};
|
};
|
||||||
|
|
||||||
export const browserFilter = data =>
|
export const browserFilter = data => data.map(({ x, y }) => ({ x: BROWSERS[x] ?? x, y }));
|
||||||
data.map(({ x, y }) => ({ x: BROWSERS[x] || x, y })).filter(({ x }) => x);
|
|
||||||
|
|
||||||
export const osFilter = data => data.filter(({ x }) => x);
|
|
||||||
|
|
||||||
export const deviceFilter = data => data.filter(({ x }) => x);
|
|
||||||
|
|
||||||
export const percentFilter = data => {
|
export const percentFilter = data => {
|
||||||
const total = data.reduce((n, { y }) => n + y, 0);
|
const total = data.reduce((n, { y }) => n + y, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user