-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMP: Add new chart component, cleanup home page and navigations.
- Loading branch information
1 parent
5bb71db
commit bc49bc6
Showing
11 changed files
with
215 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="/">Pandemic Tracker</a> | ||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbarNav"> | ||
<ul class="navbar-nav ml-auto"> | ||
<li class="nav-item"> | ||
<NavLink class="nav-link" href="/">Home</NavLink> | ||
</li> | ||
<li class="nav-item"> | ||
<NavLink class="nav-link" href="/chart-list">Charts</NavLink> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@page "/bar-chart" | ||
@rendermode InteractiveServer | ||
@inject CountryService CountryService | ||
|
||
<ApexChart TItem="Country" Title="Country Data"> | ||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Cases" | ||
SeriesType="SeriesType.Bar" | ||
XValue="e => e.Name" | ||
YValue="e=> (decimal)e.Cases" /> | ||
|
||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Deaths" | ||
SeriesType="SeriesType.Bar" | ||
XValue="e => e.Name" | ||
YValue="e=> (decimal)e.Deaths" /> | ||
|
||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Recovered" | ||
SeriesType="SeriesType.Bar" | ||
XValue="e => e.Name" | ||
YValue="e=> (decimal)e.Recovered" /> | ||
</ApexChart> | ||
|
||
@code { | ||
public List<Country> Countries { get; set; } = []; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
Countries = CountryService.GetCountriesStatic().Take(20).ToList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@page "/chart-list" | ||
@rendermode InteractiveServer | ||
|
||
<div class="container mt-5"> | ||
<h1 class="mb-4">Charts</h1> | ||
<div class="list-group"> | ||
<a href="/bar-chart" class="list-group-item list-group-item-action bg-primary text-white mb-2">Bar Chart: Total Cases, Deaths, and Recovered</a> | ||
<a href="/line-chart" class="list-group-item list-group-item-action bg-success text-white mb-2">Line Chart: Cases, Deaths, and Recovered Over Time</a> | ||
<a href="/pie-chart" class="list-group-item list-group-item-action bg-info text-white mb-2">Pie Chart: Countries recovered per one million </a> | ||
<a href="/heat-map" class="list-group-item list-group-item-action bg-warning text-dark mb-2">Heat Map: Cases per One Million</a> | ||
<a href="/scatter-plot" class="list-group-item list-group-item-action bg-danger text-white mb-2">Scatter Plot: Cases vs. Population</a> | ||
</div> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@page "/heat-map" | ||
@rendermode InteractiveServer | ||
@inject CountryService CountryService | ||
|
||
<ApexChart TItem="Country"> | ||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
SeriesType="SeriesType.Heatmap" | ||
XValue="e => e.Name" | ||
YValue="e => (decimal)e.CasesPerOneMillion" /> | ||
</ApexChart> | ||
|
||
@code { | ||
public List<Country> Countries { get; set; } = []; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
Countries = CountryService.GetCountriesStatic().Take(20).ToList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,48 @@ | ||
@page "/" | ||
|
||
<PageTitle>Home</PageTitle> | ||
<div class="container mt-5"> | ||
<div class="jumbotron bg-primary text-white text-center p-5"> | ||
<h1 class="display-4">Pandemic Tracker</h1> | ||
<hr class="my-4"> | ||
<p>This app currently only covers COVID-19. Stay informed with updated data and visualizations.</p> | ||
<a href="/chart-list" class="btn btn-light btn-lg mt-3">Navigate to Charts</a> | ||
</div> | ||
|
||
<h1>Hello everyone!</h1> | ||
<div class="row mt-5"> | ||
<div class="col-md-6 mb-4"> | ||
<div class="card h-100 shadow-sm"> | ||
<div class="card-body"> | ||
<h5 class="card-title">Real-Time Data Visualization</h5> | ||
<p class="card-text">Easily grasp intricate information through visual depictions with our robust data visualization tools.</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-6 mb-4"> | ||
<div class="card h-100 shadow-sm"> | ||
<div class="card-body"> | ||
<h5 class="card-title">API Architecture</h5> | ||
<p class="card-text">Ensure consistent functionality with a strong architectural foundation, even with changes in data provisioning APIs.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
Welcome to Pandemic Tracker. | ||
<div class="row mt-3"> | ||
<div class="col-md-6 mb-4"> | ||
<div class="card h-100 shadow-sm"> | ||
<div class="card-body"> | ||
<h5 class="card-title">Data Exportation</h5> | ||
<p class="card-text">Export data in CSV format for further analysis or record-keeping, enhancing usability and flexibility.</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-6 mb-4"> | ||
<div class="card h-100 shadow-sm"> | ||
<div class="card-body"> | ||
<h5 class="card-title">Public Health Informatics</h5> | ||
<p class="card-text">Leverage technology to improve the accessibility and utility of health-related data during critical periods.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@page "/line-chart" | ||
@rendermode InteractiveServer | ||
@inject CountryService CountryService | ||
|
||
|
||
<ApexChart TItem="Country"> | ||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Cases" | ||
SeriesType="SeriesType.Line" | ||
XValue="e => e.CreatedDate" | ||
YValue="e => (decimal)e.Cases" /> | ||
|
||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Deaths" | ||
SeriesType="SeriesType.Line" | ||
XValue="e => e.CreatedDate" | ||
YValue="e => (decimal)e.Deaths" /> | ||
|
||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Recovered" | ||
SeriesType="SeriesType.Line" | ||
XValue="e => e.CreatedDate" | ||
YValue="e => (decimal)e.Recovered" /> | ||
</ApexChart> | ||
|
||
@code { | ||
public List<Country> Countries { get; set; } = []; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
Countries = CountryService.GetCountriesStatic().Take(20).ToList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@page "/pie-chart" | ||
@rendermode InteractiveServer | ||
@inject CountryService CountryService | ||
|
||
<ApexChart TItem="Country" Title="Countries recovered per one million"> | ||
|
||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Recovered" | ||
SeriesType="SeriesType.Pie" | ||
XValue="e => e.Name" | ||
YValue="e => (decimal)e.RecoveredPerOneMillion" /> | ||
</ApexChart> | ||
|
||
@code { | ||
public List<Country> Countries { get; set; } = []; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
Countries = CountryService.GetCountriesStatic().Take(10).ToList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@page "/scatter-plot" | ||
@rendermode InteractiveServer | ||
@inject CountryService CountryService | ||
|
||
<ApexChart TItem="Country"> | ||
<ApexPointSeries TItem="Country" | ||
Items="Countries" | ||
Name="Cases vs Population" | ||
SeriesType="SeriesType.Scatter" | ||
XValue="e => (decimal)e.Population" | ||
YValue="e => (decimal)e.Cases" /> | ||
</ApexChart> | ||
|
||
@code { | ||
public List<Country> Countries { get; set; } = []; | ||
|
||
protected override void OnInitialized() | ||
{ | ||
Countries = CountryService.GetCountriesStatic().Take(20).ToList(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters