1時間単位での集計を追加

This commit is contained in:
syuilo
2018-08-23 15:40:24 +09:00
parent a62e2b83ff
commit 8fc1e07136
5 changed files with 245 additions and 77 deletions

View File

@ -14,6 +14,7 @@ export default (params: any) => new Promise(async (res, rej) => {
const d = now.getDate();
const stats = await Stats.find({
span: 'day',
date: {
$gt: new Date(y - 1, m, d)
}
@ -44,6 +45,7 @@ export default (params: any) => new Promise(async (res, rej) => {
} else {
chart.unshift({
date: day,
span: 'day',
users: {
local: {
total: 0,