Improve health condition charts.

This commit is contained in:
Joshua Bemenderfer
2022-01-01 13:18:28 -05:00
parent b02aa6e0b3
commit 6ca85aaef1
22 changed files with 60 additions and 45 deletions

View File

@@ -20,7 +20,7 @@
<span v-else>No Data</span>
</template>
<template v-slot:meta v-if="chips.population">
<span class="text-indigo-500 font-semibold">{{chips.today_cases.toLocaleString()}}</span> out of <span class="text-indigo-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
<span class="text-violet-500 font-semibold">{{chips.today_cases.toLocaleString()}}</span> out of <span class="text-violet-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
</template>
</StatCard>
@@ -30,7 +30,7 @@
{{chips.total_cases.toLocaleString()}}
</template>
<template v-slot:meta v-if="chips.total_case_change != null">
<span class="font-semibold text-indigo-500">
<span class="font-semibold text-violet-500">
{{Math.abs(chips.total_case_change).toLocaleString()}} ({{chips.total_case_change_percent}}%)
</span> more than previous day
</template>
@@ -43,7 +43,7 @@
<span v-else>No Data</span>
</template>
<template v-slot:meta v-if="chips.total_cases != null && chips.population">
<span class="text-indigo-500 font-semibold">{{chips.total_cases.toLocaleString()}}</span> out of <span class="text-indigo-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
<span class="text-violet-500 font-semibold">{{chips.total_cases.toLocaleString()}}</span> out of <span class="text-violet-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
</template>
</StatCard>
</template>

View File

@@ -1,9 +1,9 @@
<template>
<Card class="flex flex-col">
<h2 class="mb-1 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-1 text-xl text-violet-900 flex justify-between items-center">
Cases per 10,000 Residents
</h2>
<p class="mb-4 text-sm text-indigo-700">Last two weeks</p>
<p class="mb-4 text-sm text-violet-700">Last two weeks</p>
<JSCharting :options="mapOptions" class="flex-1"/>
</Card>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily Cases
<select v-model="chart" class="text-base m-0">

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Total Cases
</h2>
<JSCharting :options="areaOptions"></JSCharting>

View File

@@ -20,7 +20,7 @@
<span v-else>No Data</span>
</template>
<template v-slot:meta v-if="chips.current_deaths != null && chips.population">
<span class="text-indigo-500 font-semibold">{{chips.current_deaths.toLocaleString()}}</span> out of <span class="text-indigo-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
<span class="text-violet-500 font-semibold">{{chips.current_deaths.toLocaleString()}}</span> out of <span class="text-violet-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
</template>
</StatCard>
@@ -30,7 +30,7 @@
{{chips.total_deaths.toLocaleString()}}
</template>
<template v-slot:meta v-if="chips.total_death_change != null">
<span class="font-semibold text-indigo-500">
<span class="font-semibold text-violet-500">
{{Math.abs(chips.total_death_change).toLocaleString()}} ({{chips.total_death_change_percent}}%)
</span> more than previous day
</template>
@@ -43,7 +43,7 @@
<span v-else>No Data</span>
</template>
<template v-slot:meta v-if="chips.total_deaths != null && chips.population">
<span class="text-indigo-500 font-semibold">{{chips.total_deaths.toLocaleString()}}</span> out of <span class="text-indigo-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
<span class="text-violet-500 font-semibold">{{chips.total_deaths.toLocaleString()}}</span> out of <span class="text-violet-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
</template>
</StatCard>
</template>

View File

@@ -1,9 +1,9 @@
<template>
<Card class="flex flex-col">
<h2 class="mb-1 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-1 text-xl text-violet-900 flex justify-between items-center">
Total Deaths per 10,000 Residents
</h2>
<p class="mb-4 text-sm text-indigo-700">Since Feburary 1, 2020</p>
<p class="mb-4 text-sm text-violet-700">Since Feburary 1, 2020</p>
<JSCharting :options="mapOptions" class="flex-1"/>
</Card>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily Deaths
<select v-model="chart" class="text-base m-0">

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Total Deaths
</h2>
<JSCharting :options="areaOptions"></JSCharting>

View File

@@ -20,7 +20,7 @@
<span v-else>No Data</span>
</template>
<template v-slot:meta v-if="chips.population">
<span class="text-indigo-500 font-semibold">{{chips.last_14_days_hospitalizations.toLocaleString()}}</span> out of <span class="text-indigo-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
<span class="text-violet-500 font-semibold">{{chips.last_14_days_hospitalizations.toLocaleString()}}</span> out of <span class="text-violet-500 font-semibold">{{chips.population.toLocaleString()}}</span> residents
</template>
</StatCard>
</template>

View File

@@ -1,9 +1,9 @@
<template>
<Card class="flex flex-col">
<h2 class="mb-1 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-1 text-xl text-violet-900 flex justify-between items-center">
Hospitalizations per 10,000 Residents
</h2>
<p class="mb-4 text-sm text-indigo-700">Last two weeks</p>
<p class="mb-4 text-sm text-violet-700">Last two weeks</p>
<JSCharting :options="mapOptions" class="flex-1" style="min-height: 50vh;"/>
</Card>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily Hospitalizations
<select v-model="chart" class="text-base m-0">

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily Hospitalizations per 10,000 Residents
<select v-model="chart" class="text-base m-0" v-if="parameters.county !== '-- Unknown --'">
@@ -14,7 +14,7 @@
<JSCharting v-if="chart === 'line'" :options="areaOptions"></JSCharting>
</template>
<template v-else>
<div class="w-full h-full flex items-center justify-center text-2xl text-indigo-700 font-bold">No Data</div>
<div class="w-full h-full flex items-center justify-center text-2xl text-violet-700 font-bold">No Data</div>
</template>
</Card>
</template>

View File

@@ -15,7 +15,7 @@
{{chips.tests.date.toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' })}}
</template>
<template v-slot:meta v-if="chips.tests">
<span class="text-indigo-500 font-bold">{{chips.tests.value.toLocaleString()}}</span> tests performed
<span class="text-violet-500 font-bold">{{chips.tests.value.toLocaleString()}}</span> tests performed
</template>
</StatCard>

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily Positive Antigen Results
<select v-model="chart" class="text-base m-0">

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily Antigen Tests Performed
<select v-model="chart" class="text-base m-0">
<option value="calendar">Calendar</option>

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily Positive PCR Results
<select v-model="chart" class="text-base m-0">

View File

@@ -1,6 +1,6 @@
<template>
<Card>
<h2 class="mb-6 text-xl text-indigo-900 flex justify-between items-center">
<h2 class="mb-6 text-xl text-violet-900 flex justify-between items-center">
Daily PCR Tests Performed
<select v-model="chart" class="text-base m-0">