Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #233 from ohyama/fix-total-count
Browse files Browse the repository at this point in the history
陽性患者の属性とクラスター別陽性患者数の人数計算を修正
  • Loading branch information
y-chan authored Apr 9, 2020
2 parents 8a38c19 + 033d731 commit b9f9645
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 1 addition & 3 deletions components/cards/ConfirmedCasesAttributesCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ export default {
const patientsTable = formatTable(patients.data)
const sumInfoOfPatients = {
lText: patientsGraph[
patientsGraph.length - 1
].cumulative.toLocaleString(),
lText: patientsTable.datasets.length.toLocaleString(),
sText: this.$t('{date}の累計', {
date: patientsGraph[patientsGraph.length - 1].label
}),
Expand Down
12 changes: 5 additions & 7 deletions components/cards/PatientsByClusters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@
<script>
import clusters from '@/data/clusters.json'
// import clustersSummary from '@/data/clusters_summary.json'
import patientsSummary from '@/data/patients_summary.json'
import patients from '@/data/patients.json'
// import DataTable from '@/components/DataTable.vue'
import Scatter from '@/components/Scatter'
// import formatClustersTable from '@/utils/formatClustersTable'
import formatGraph from '@/utils/formatGraph'
import formatTable from '@/utils/formatTable'
// import formatVariableGraph from '@/utils/formatVariableGraph'
import formatClustersScatter from '@/utils/formatClustersScatter'
Expand All @@ -64,8 +64,8 @@ export default {
// const clustersTable = formatClustersTable(clustersSummary.data)
// const clustersGraph = formatVariableGraph(clustersSummary.data)
// 感染者数グラフ 感染者数取得のため
const patientsGraph = formatGraph(patientsSummary.data)
// 感染者数
const patientsTable = formatTable(patients.data)
// 日別クラスター陽性患者数
const clustersScatter = formatClustersScatter(clusters.data)
Expand All @@ -79,9 +79,7 @@ export default {
sText:
this.$t('重複者') +
': ' +
(
clusterTotal - patientsGraph[patientsGraph.length - 1].cumulative
).toLocaleString() +
(clusterTotal - patientsTable.datasets.length).toLocaleString() +
this.$t(''),
unit: this.$t('')
}
Expand Down

0 comments on commit b9f9645

Please sign in to comment.