Skip to content

Commit

Permalink
Merge pull request #1265 from tokyo-metropolitan-gov/staging
Browse files Browse the repository at this point in the history
Release 2020/03/13 ver. 1.1.1
  • Loading branch information
halsk authored Mar 12, 2020
2 parents d14f865 + 19f6170 commit 8316317
Show file tree
Hide file tree
Showing 13 changed files with 377 additions and 145 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Issues にあるいろいろな修正にご協力いただけると嬉しいで
## ライセンス
本ソフトウェアは、[MITライセンス](./LICENSE.txt)の元提供されています。

## このサイトから派生したサイト

[Link先](./forkedSites.md)を御覧ください。

## 開発者向け情報

### 環境構築の手順
Expand Down
25 changes: 25 additions & 0 deletions components/AgencyBarChart.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<template>
<data-view :title="title" :title-id="titleId" :date="date" :url="url">
<template v-slot:button>
<small :class="$style.DataViewDesc">
※土・日・祝日を除く庁舎開庁日の1週間累計数
</small>
</template>
<bar
:chart-id="chartId"
:chart-data="displayData"
Expand All @@ -9,6 +14,17 @@
</data-view>
</template>

<style module lang="scss">
.DataView {
&Desc {
margin-top: 10px;
margin-bottom: 0 !important;
font-size: 12px;
color: $gray-3;
}
}
</style>

<i18n>
{
"ja": {
Expand Down Expand Up @@ -129,6 +145,15 @@ export default {
}
}
},
legend: {
display: true,
onHover: e => {
e.currentTarget.style.cursor = 'pointer'
},
onLeave: e => {
e.currentTarget.style.cursor = 'default'
}
},
scales: {
xAxes: [
{
Expand Down
24 changes: 18 additions & 6 deletions components/SvgCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
)
}}<br />
{{ $t('(チャーター機帰国者、クルーズ船乗客等は含まれていない)') }}
<br />
{{
$t(
'検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります'
)
}}
</p>
</template>
<slot />
Expand All @@ -18,27 +24,33 @@
{
"ja": {
"(注)都内において疑い例または患者の濃厚接触者として検査を行ったものについて掲載": "(注)都内において疑い例または患者の濃厚接触者として検査を行ったものについて掲載",
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(チャーター機帰国者、クルーズ船乗客等は含まれていない)"
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(チャーター機帰国者、クルーズ船乗客等は含まれていない)",
"検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります"
},
"en": {
"(注)都内において疑い例または患者の濃厚接触者として検査を行ったものについて掲載": "(Note) This shows the examinations for the patients with possible infection or for those who had close contact with them.",
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(excluding the returnees on charter flights or the cruise ship passengers)"
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(excluding the returnees on charter flights or the cruise ship passengers)",
"検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tested is published as preliminary figures and may be revised as confirmed data at a later date"
},
"zh-cn": {
"(注)都内において疑い例または患者の濃厚接触者として検査を行ったものについて掲載": "(注)仅列出在东京都接受检查的疑似病例及确诊病例的密切接触者",
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(不包括乘包机返日者、邮轮乘客等)"
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(不包括乘包机返日者、邮轮乘客等)",
"検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tested is published as preliminary figures and may be revised as confirmed data at a later date"
},
"zh-tw": {
"(注)都内において疑い例または患者の濃厚接触者として検査を行ったものについて掲載": "(註)列出與東京都疑似病例或是曾與患者密切接觸 ",
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(包機返國者、郵輪乘客等除外)"
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(包機返國者、郵輪乘客等除外)",
"検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tested is published as preliminary figures and may be revised as confirmed data at a later date"
},
"ko": {
"(注)都内において疑い例または患者の濃厚接触者として検査を行ったものについて掲載": "(주)도내에서 의심 사례 또는 환자와 접속했을 가능성이 있는 사람으로서 검사를 실시한 것에 대해 게재.",
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(전세기 귀국자, 크루즈선 승객 등은 포함하지 않았습니다)"
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(전세기 귀국자, 크루즈선 승객 등은 포함하지 않았습니다)",
"検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tested is published as preliminary figures and may be revised as confirmed data at a later date"
},
"ja-basic": {
"(注)都内において疑い例または患者の濃厚接触者として検査を行ったものについて掲載": "(ちゅうい)コロナ に かかっている かも しれない ひと、または コロナ の ひと と ちかく で たくさん はなした ひと に とうきょうと が けんさ した もの について かいています。",
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(にほん の くに が とくべつに おくった ひこうき で かえってきた ひと、よこはま の クルーズ の ふね に のっていた ひと は ふくみません)"
"(チャーター機帰国者、クルーズ船乗客等は含まれていない)": "(にほん の くに が とくべつに おくった ひこうき で かえってきた ひと、よこはま の クルーズ の ふね に のっていた ひと は ふくみません)",
"検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "検査実施人数は、速報値として公開するものであり、後日確定データとして修正される場合があります"
}
}
</i18n>
Expand Down
57 changes: 43 additions & 14 deletions components/TimeStackedBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<template v-slot:button>
<p class="Graph-Desc">
{{ $t('(注)同一の対象者について複数の検体を調査する場合あり') }}
<br />
{{
$t(
'検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります'
)
}}
</p>
<data-selector v-model="dataKind" />
</template>
Expand All @@ -26,40 +32,52 @@
{
"ja": {
"(注)同一の対象者について複数の検体を調査する場合あり": "(注)同一の対象者について複数の検体を調査する場合あり",
"検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります",
"{date}の全体累計": "%{date}の全体累計",
"{date}の合計": "%{date}の合計",
"都内": "都内",
"その他": "その他"
"その他": "その他",
"合計": "合計"
},
"en": {
"(注)同一の対象者について複数の検体を調査する場合あり": "(Note) More than one sample from the same subject may be tested.",
"検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tests conducted is published as preliminary figures and may be revised as confirmed data at a later date",
"{date}の全体累計": "Cumulative total as of %{date}",
"都内": "Tokyo",
"その他": "Others"
"その他": "Others",
"合計": "Total"
},
"zh-cn": {
"(注)同一の対象者について複数の検体を調査する場合あり": "(註) 同一個案可能被多次檢查",
"検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tests conducted is published as preliminary figures and may be revised as confirmed data at a later date",
"{date}の全体累計": "截至 %{date}",
"都内": "东京都",
"その他": "其它"
"その他": "其它",
"合計": "总计"
},
"zh-tw": {
"(注)同一の対象者について複数の検体を調査する場合あり": "(註)同一個案可能被多次檢查",
"検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tests conducted is published as preliminary figures and may be revised as confirmed data at a later date",
"{date}の全体累計": "累計至 %{date}",
"都内": "東京都",
"その他": "其它"
"その他": "其它",
"合計": "合計"
},
"ko": {
"(注)同一の対象者について複数の検体を調査する場合あり": "(주의) 동일 대상자에 대하여 여러번의 검체를 조사하는 경우가 있음",
"検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "The number of tests conducted is published as preliminary figures and may be revised as confirmed data at a later date",
"{date}の全体累計": "%{date}의 누적 수",
"都内": "도쿄도내",
"その他": "기타"
"その他": "기타",
"合計": "합계"
},
"ja-basic": {
"(注)同一の対象者について複数の検体を調査する場合あり": "(ちゅうい) おなじ ひとに なんどか けんさ を する とき が あります",
"検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります": "検査実施数は、速報値として公開するものであり、後日確定データとして修正される場合があります",
"{date}の全体累計": "%{date} ぜんぶで",
"都内": "とうきょうと の なか",
"その他": "そのほか"
"その他": "そのほか",
"合計": "ごうけい"
}
}
</i18n>
Expand Down Expand Up @@ -182,17 +200,22 @@ export default {
const labelArray = [labelTokyo, labelOthers]
let casesTotal, cases
if (this.dataKind === 'transition') {
casesTotal = sumArray[tooltipItem.index]
cases = data[tooltipItem.datasetIndex][tooltipItem.index]
casesTotal = sumArray[tooltipItem.index].toLocaleString()
cases = data[tooltipItem.datasetIndex][
tooltipItem.index
].toLocaleString()
} else {
casesTotal = cumulativeSumArray[tooltipItem.index]
cases =
cumulativeData[tooltipItem.datasetIndex][tooltipItem.index]
casesTotal = cumulativeSumArray[
tooltipItem.index
].toLocaleString()
cases = cumulativeData[tooltipItem.datasetIndex][
tooltipItem.index
].toLocaleString()
}
return `${casesTotal} ${unit} (${
return `${
labelArray[tooltipItem.datasetIndex]
}: ${cases})`
}: ${cases} ${unit} (${this.$t('合計')}: ${casesTotal} ${unit})`
},
title(tooltipItem, data) {
return data.labels[tooltipItem[0].index]
Expand All @@ -202,7 +225,13 @@ export default {
responsive: true,
maintainAspectRatio: false,
legend: {
display: true
display: true,
onHover: e => {
e.currentTarget.style.cursor = 'pointer'
},
onLeave: e => {
e.currentTarget.style.cursor = 'default'
}
},
scales: {
xAxes: [
Expand Down
Loading

0 comments on commit 8316317

Please sign in to comment.