Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #190 from covid19-miyazaki/staging
Browse files Browse the repository at this point in the history
マスターの更新 2020/04/28
  • Loading branch information
korosuke613 authored Apr 28, 2020
2 parents 33dd9ca + 8421055 commit 328fd24
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pr_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- development
- master
jobs:
build:
runs-on: ubuntu-18.04
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scraping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ jobs:
title: コロナ情報の更新
commit-message: コロナ情報を更新しました.
branch: auto_update_covid19
labels: auto_merge
base: master
8 changes: 1 addition & 7 deletions components/DataView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@
{{ $t('埋め込みコードをコピーしました') }}
</t-i18n>
</div>
<v-footer class="DataView-Footer">
<time :datetime="date"
><t-i18n>{{ $t('{date} 更新', { date }) }}</t-i18n></time
>
<slot name="footer" />
</v-footer>
</div>
</v-card>
</template>
Expand Down Expand Up @@ -492,7 +486,7 @@ export default Vue.extend({
.icon-resize {
border-radius: 50%;
font-size: 30px;
// font-size: 30px;
&.twitter {
color: #fff;
Expand Down
10 changes: 10 additions & 0 deletions components/TimeBarChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@ const options: ThisTypedComponentOptionsWithRecordProps<
displayTransitionRatio() {
const lastDay = this.chartData.slice(-1)[0].transition
const lastDayBefore = this.chartData.slice(-2)[0].transition
const lastDayLabel = this.chartData.slice(-1)[0].label
const lastDayBeforeLabel = this.chartData.slice(-2)[0].label
const lastDayTime = new Date(lastDayLabel).getTime()
const lastDayBeforeTime = new Date(lastDayBeforeLabel).getTime()
// 1日以上差があるということは昨日はゼロ件なのでゼロと比較する必要あり(86,400,000ミリ秒=1日)
const dateDiff = (lastDayTime - lastDayBeforeTime) / 86400000
if (dateDiff > 1) return this.formatDayBeforeRatio(lastDay - 0)
return this.formatDayBeforeRatio(lastDay - lastDayBefore)
},
displayInfo() {
Expand Down Expand Up @@ -250,6 +259,7 @@ const options: ThisTypedComponentOptionsWithRecordProps<
gridLines: {
display: false
},
offset: true,
ticks: {
fontSize: 9,
maxTicksLimit: 20,
Expand Down
22 changes: 11 additions & 11 deletions data/data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"lastUpdate": "2020/04/24",
"lastUpdate": "2020/04/26",
"patients": {
"date": "2020/04/24",
"date": "2020/04/26",
"data": [
{
"リリース日": "2020-03-04T08:00:00.000Z",
Expand Down Expand Up @@ -48,8 +48,8 @@
"居住地": "宮崎市",
"年代": "10代",
"性別": "女性",
"退院": "入院中",
"date": "2020-04-03"
"退院": "退院",
"date": "2020-04-26"
},
{
"リリース日": "2020-04-05T08:00:00.000Z",
Expand All @@ -64,8 +64,8 @@
"居住地": "宮崎市",
"年代": "50代",
"性別": "女性",
"退院": "入院中",
"date": "2020-04-04"
"退院": "退院",
"date": "2020-04-26"
},
{
"リリース日": "2020-04-05T08:00:00.000Z",
Expand All @@ -80,8 +80,8 @@
"居住地": "宮崎市",
"年代": "60代",
"性別": "男性",
"退院": "入院中",
"date": "2020-04-05"
"退院": "退院",
"date": "2020-04-23"
},
{
"リリース日": "2020-04-06T08:00:00.000Z",
Expand Down Expand Up @@ -151,11 +151,11 @@
"children": [
{
"attr": "入院中",
"value": 11,
"value": 8,
"children": [
{
"attr": "軽症・中等症",
"value": 11
"value": 8
},
{
"attr": "重症",
Expand All @@ -165,7 +165,7 @@
},
{
"attr": "退院",
"value": 6
"value": 9
},
{
"attr": "死亡",
Expand Down

0 comments on commit 328fd24

Please sign in to comment.