Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit

Permalink
Add visitor data type
Browse files Browse the repository at this point in the history
  • Loading branch information
shgtkshruch committed Mar 20, 2020
1 parent 64cc14c commit 0ce90ff
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions components/VisitorsBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ import 'dayjs/locale/en'
import weekOfYear from 'dayjs/plugin/weekOfYear'
import updateLocale from 'dayjs/plugin/updateLocale'
import minMax from 'dayjs/plugin/minMax'
import shinjukuData from '@/data/13104_daily_visitors.json'
import DataView from '@/components/DataView.vue'
import { single as color } from '@/utils/colors'
Expand All @@ -66,18 +65,24 @@ dayjs.updateLocale('en', {
weekStart: 1 // 月曜始まり
})
type VisitorData = {
date: string
population: number
holiday: boolean
}
type Data = {}
type Methods = {
tooltipTitle: (tooltipItems: any, data: any) => string
}
type Computed = {
groupByWeekData: {
[weekNum: number]: typeof shinjukuData.data
[weekNum: number]: VisitorData[]
}
labels: string[]
standardValue: number
targetData: {
[weekNum: number]: typeof shinjukuData.data
[weekNum: number]: VisitorData[]
}
targetValues: number[]
displayData: {
Expand Down Expand Up @@ -109,7 +114,7 @@ type Props = {
title: string
titleId: string
chartId: string
chartData: typeof shinjukuData.data
chartData: VisitorData[]
date: string
standardDate: string
startDate: string
Expand Down Expand Up @@ -139,7 +144,11 @@ const options: ThisTypedComponentOptionsWithRecordProps<
required: false,
default: ''
},
chartData: [],
chartData: {
type: Array,
required: false,
default: () => []
},
date: {
type: String,
required: false,
Expand Down

0 comments on commit 0ce90ff

Please sign in to comment.