mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 22:27:16 +01:00
Add support for MySQL.
This commit is contained in:
parent
e309376150
commit
a248f35db2
9 changed files with 302 additions and 102 deletions
|
|
@ -97,7 +97,9 @@ export function getDateArray(data, startDate, endDate, unit) {
|
|||
const n = diff(endDate, startDate) + 1;
|
||||
|
||||
function findData(t) {
|
||||
const x = data.find(e => new Date(e.t).getTime() === normalize(new Date(t)).getTime());
|
||||
const x = data.find(e => {
|
||||
return getLocalTime(new Date(e.t)).getTime() === normalize(new Date(t)).getTime();
|
||||
});
|
||||
|
||||
return x?.y || 0;
|
||||
}
|
||||
|
|
@ -109,5 +111,7 @@ export function getDateArray(data, startDate, endDate, unit) {
|
|||
arr.push({ t, y });
|
||||
}
|
||||
|
||||
console.log({ unit, arr });
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue