Created first version of the time-based visits chart

This commit is contained in:
Alejandro Celaya
2020-05-30 09:25:15 +02:00
parent c670d86955
commit 61867366e7
5 changed files with 98 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
import bowser from 'bowser';
import { zipObj } from 'ramda';
import { hasValue } from '../utils';
const DEFAULT = 'Others';
@@ -35,3 +36,5 @@ export const extractDomain = (url) => {
return domain.split(':')[0];
};
export const fillTheGaps = (stats, labels) => Object.values({ ...zipObj(labels, labels.map(() => 0)), ...stats });