Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Release 2020/08/03 Ver.2 #5180

Merged
merged 11 commits into from
Aug 3, 2020
2 changes: 1 addition & 1 deletion components/ConfirmedCasesIncreaseRatioByWeekChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
displayDataHeader() {
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: [
{
data: [Math.max(...this.chartData.map((d) => d.transition))],
Expand Down
5 changes: 2 additions & 3 deletions components/DashedRectangleTimeBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
fontColor: '#808080',
maxRotation: 0,
callback: (label: string) => {
return label.split('/')[1]
return dayjs(label).format('D')
},
},
// #2384: If you set "type" to "time", make sure that the bars at both ends are not hidden.
Expand All @@ -313,7 +313,6 @@ const options: ThisTypedComponentOptionsWithRecordProps<
type: 'time',
time: {
unit: 'month',
parser: 'M/D',
displayFormats: {
month: 'MMM',
},
Expand Down Expand Up @@ -344,7 +343,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
displayDataHeader() {
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: [
{
data: [Math.max(...this.chartData.map((d) => d.transition))],
Expand Down
2 changes: 1 addition & 1 deletion components/MixedBarAndLineChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
displayDataHeader() {
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: (this.dataLabels as string[]).map((_) => ({
data: [],
backgroundColor: 'transparent',
Expand Down
2 changes: 1 addition & 1 deletion components/MonitoringConfirmedCasesChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
displayDataHeader() {
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: (this.dataLabels as string[]).map((_) => ({
data: [],
backgroundColor: 'transparent',
Expand Down
2 changes: 1 addition & 1 deletion components/MonitoringConsultationDeskReportChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
displayDataHeader() {
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: (this.dataLabels as string[]).map((_) => ({
data: [],
backgroundColor: 'transparent',
Expand Down
2 changes: 1 addition & 1 deletion components/PositiveRateMixedChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
}
}
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: [
{
data: [this.displayData.datasets[0].data[n]],
Expand Down
7 changes: 3 additions & 4 deletions components/SevereCaseBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
fontColor: '#808080',
maxRotation: 0,
callback: (label: string) => {
return label.split('/')[1]
return dayjs(label).format('D')
},
},
// #2384: If you set "type" to "time", make sure that the bars at both ends are not hidden.
Expand All @@ -242,7 +242,6 @@ const options: ThisTypedComponentOptionsWithRecordProps<
type: 'time',
time: {
unit: 'month',
parser: 'M/D',
displayFormats: {
month: 'MMM',
},
Expand Down Expand Up @@ -273,7 +272,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
displayDataHeader() {
return {
labels: ['2020/1/1', '2020/1/2'],
labels: ['2020-01-01', '2020-01-02'],
datasets: [
{
data: [
Expand Down Expand Up @@ -308,7 +307,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
maxRotation: 0,
minRotation: 0,
callback: (label: string) => {
return label.split('/')[1]
return dayjs(label).format('D')
},
},
},
Expand Down
14 changes: 5 additions & 9 deletions components/TimeBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
title(tooltipItem, data) {
const label = data.labels![tooltipItem[0].index!] as string
return self.$d(
getComplementedDate(label),
'dateWithoutYear'
)
return self.$d(getComplementedDate(label), 'dateWithoutYear')
},
},
},
Expand All @@ -316,7 +313,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
fontColor: '#808080',
maxRotation: 0,
callback: (label: string) => {
return label.split('/')[1]
return dayjs(label).format('D')
},
},
// #2384: If you set "type" to "time", make sure that the bars at both ends are not hidden.
Expand All @@ -340,7 +337,6 @@ const options: ThisTypedComponentOptionsWithRecordProps<
type: 'time',
time: {
unit: 'month',
parser: 'M/D',
displayFormats: {
month: 'MMM',
},
Expand Down Expand Up @@ -372,7 +368,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
displayDataHeader() {
if (this.dataKind === 'transition') {
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: [
{
data: [Math.max(...this.chartData.map((d) => d.transition))],
Expand All @@ -383,7 +379,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
}
}
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: [
{
data: [Math.max(...this.chartData.map((d) => d.cumulative))],
Expand Down Expand Up @@ -415,7 +411,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
maxRotation: 0,
minRotation: 0,
callback: (label: string) => {
return label.split('/')[1]
return dayjs(label).format('D')
},
},
},
Expand Down
12 changes: 4 additions & 8 deletions components/TimeStackedBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
},
title(tooltipItem, data) {
const label = data.labels![tooltipItem[0].index!] as string
return self.$d(
getComplementedDate(label),
'dateWithoutYear'
)
return self.$d(getComplementedDate(label), 'dateWithoutYear')
},
},
},
Expand All @@ -374,7 +371,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
fontColor: '#808080',
maxRotation: 0,
callback: (label: string) => {
return label.split('/')[1]
return dayjs(label).format('D')
},
},
// #2384: If you set "type" to "time", make sure that the bars at both ends are not hidden.
Expand All @@ -398,7 +395,6 @@ const options: ThisTypedComponentOptionsWithRecordProps<
type: 'time',
time: {
unit: 'month',
parser: 'M/D',
displayFormats: {
month: 'MMM',
},
Expand Down Expand Up @@ -440,7 +436,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
}
}
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: [
{
data: [this.displayData.datasets[0].data[n]],
Expand Down Expand Up @@ -477,7 +473,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
maxRotation: 0,
minRotation: 0,
callback: (label: string) => {
return label.split('/')[1]
return dayjs(label).format('D')
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion components/UntrackedRateMixedChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
}
}
return {
labels: ['2020/1/1'],
labels: ['2020-01-01'],
datasets: [
{
data: [this.displayData.datasets[0].data[n]],
Expand Down
2 changes: 1 addition & 1 deletion components/cards/HospitalizedNumberCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:chart-data="patientsGraph"
:date="positiveStatus.date"
:unit="$t('人')"
:dashed-rectangle-range="'5/11'"
:dashed-rectangle-range="'2020-05-11'"
:added-value="200"
:table-labels="tableLabels"
>
Expand Down
4 changes: 2 additions & 2 deletions components/cards/SevereCaseCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<script>
import Data from '@/data/positive_status.json'
import SevereCaseBarChart from '@/components/SevereCaseBarChart.vue'
import { convertDateToISO8601Format } from '@/utils/formatDate.ts'

export default {
components: {
Expand All @@ -51,11 +52,10 @@ export default {
Data.data
.filter((d) => new Date(d.date) > new Date('2020-04-26'))
.forEach((d) => {
const date = new Date(d.date)
const subTotal = d.severe_case
if (!isNaN(subTotal)) {
graphData.push({
label: `${date.getMonth() + 1}/${date.getDate()}`,
label: convertDateToISO8601Format(d.date),
transition: subTotal,
})
}
Expand Down
5 changes: 4 additions & 1 deletion components/cards/TestedNumberCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
import Data from '@/data/data.json'
import { getDayjsObject } from '@/utils/formatDate'
import TimeStackedBarChart from '@/components/TimeStackedBarChart.vue'
dayjs.extend(duration)
Expand All @@ -73,7 +74,9 @@ export default {
this.$t('健康安全研究センターが行った検査件数'),
this.$t('医療機関等が行った検査件数'),
]
const inspectionsLabels = Data.inspections_summary.labels
const inspectionsLabels = Data.inspections_summary.labels.map((d) => {
return getDayjsObject(d).format('YYYY-MM-DD')
})
const inspectionsDataLabels = [
this.$t('健康安全研究センターが行った検査件数'),
this.$t('医療機関等が行った検査件数'),
Expand Down
14 changes: 9 additions & 5 deletions data/agency.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"date": "2020\/7\/27 11:00",
"date": "2020\/8\/3 11:00",
"labels": [
"1\/1~1\/5",
"1\/6~1\/12",
Expand Down Expand Up @@ -30,7 +30,8 @@
"6\/29~7\/5",
"7\/6~7\/12",
"7\/13~7\/19",
"7\/20~7\/26"
"7\/20~7\/26",
"7\/27~8\/2"
],
"datasets": [
{
Expand Down Expand Up @@ -65,7 +66,8 @@
6200,
6187,
6033,
3662
3662,
6067
]
},
{
Expand Down Expand Up @@ -100,7 +102,8 @@
8345,
8135,
7930,
5143
5143,
7912
]
},
{
Expand Down Expand Up @@ -135,7 +138,8 @@
157,
319,
382,
158
158,
302
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion data/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -114231,7 +114231,7 @@
}
]
},
"lastUpdate": "2020\/08\/02 20:15",
"lastUpdate": "2020\/08\/03 11:00",
"main_summary": {
"attr": "検査実施人数",
"value": 16351,
Expand Down
Loading