Skip to content

Commit

Permalink
feat: add mock data
Browse files Browse the repository at this point in the history
  • Loading branch information
lbwa committed Sep 23, 2018
1 parent c2a3f0d commit 221d188
Show file tree
Hide file tree
Showing 4 changed files with 1,938 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mock/chart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import dayjs from 'dayjs'

const visitorData = []
const beginDay = new Date().getTime()
const fakeDailyVisitor = [7, 5, 4, 2, 4, 7, 5, 6, 5, 9, 6, 3, 1, 5, 3, 6, 5]

for (let i = 0; i < fakeDailyVisitor.length; i++) {
visitorData.push({
date: dayjs(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
visitor: fakeDailyVisitor[i]
})
}

export {
visitorData
}
Loading

0 comments on commit 221d188

Please sign in to comment.