This repository has been archived by the owner on Jun 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from TakwimuAfrica/feature/implement-data-visu…
…alisation Implement data visualisation template
- Loading branch information
Showing
10 changed files
with
131 additions
and
73 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,47 @@ | ||
<div class="py-2"> | ||
<h5>{{ indicator.indicator.name }}</h5> | ||
|
||
<div class="btn-group ml-4" role="group" style="margin-bottom: -100px;"> | ||
<button type="button" class="btn"> | ||
<i class="fa fa-flag"></i> | ||
</button> | ||
<button type="button" class="btn"> | ||
<i class="fa fa-exchange"></i> | ||
</button> | ||
<button type="button" class="btn"> | ||
<i class="fa fa-code"></i> | ||
</button> | ||
<button type="button" class="btn"> | ||
<i class="fa fa-download"></i> | ||
</button> | ||
<button type="button" class="btn"> | ||
<i class="fa fa-share-alt"></i> | ||
</button> | ||
<button type="button" class="btn"> | ||
<i class="fa fa-heart"></i> | ||
</button> | ||
<button type="button" class="btn"> | ||
<i class="fa fa-book-open"></i> | ||
</button> | ||
</div> | ||
|
||
<ul class="nav nav-tabs justify-content-end pr-4" role="tablist"> | ||
<li class="nav-item"> | ||
<a class="nav-link active mr-1" id="d{{ indicator.indicator.id }}-dv-chart-tab" data-toggle="tab" href="#d{{ indicator.indicator.id }}-dv-chart" role="tab" | ||
aria-controls="d{{ indicator.indicator.id }}-dv-chart" aria-selected="true">Chart</a> | ||
</li> | ||
<li class="nav-item mr-1"> | ||
<a class="nav-link" id="d{{ indicator.indicator.id }}-dv-table-tab" data-toggle="tab" href="#d{{ indicator.indicator.id }}-dv-table" role="tab" | ||
aria-controls="d{{ indicator.indicator.id }}-dv-table" aria-selected="false">Table</a> | ||
</li> | ||
</ul> | ||
|
||
<div class="tab-content border border-top-0 p-3 pt-4"> | ||
<div class="tab-pane fade show active" id="d{{ indicator.indicator.id }}-dv-chart" role="tabpanel" aria-labelledby="d{{ indicator.indicator.id }}-dv-chart-tab"> | ||
{% include 'takwimu/_includes/dataview/chart.html' %} | ||
</div> | ||
<div class="tab-pane fade" id="d{{ indicator.indicator.id }}-dv-table" role="tabpanel" aria-labelledby="d{{ indicator.indicator.id }}-dv-table-tab"> | ||
{% include 'takwimu/_includes/dataview/table.html' %} | ||
</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,51 @@ | ||
<h6 class="mt-1">Summary</h6> | ||
<h5>{{ indicator.indicator.description }}</h5> | ||
|
||
<div class="row px-4"> | ||
<canvas id="canvas"></canvas> | ||
</div> | ||
|
||
<p class="small text-muted mb-0 mt-2 ml-1"><i class="far fa-calendar-alt mr-1"></i> Last updated 10 May 2018</p> | ||
|
||
<script> | ||
var barChartData = { | ||
labels: ['2015', '2016', '2017'], | ||
datasets: [{ | ||
label: 'Youth Unemployment', | ||
backgroundColor: 'rgb(54, 162, 235)', //Blue | ||
data: [11,25,33] | ||
}, { | ||
label: 'Unemployment', | ||
backgroundColor: 'rgb(153, 102, 255)', //Purple | ||
data: [8,11,18], | ||
|
||
}] | ||
}; | ||
window.onload = function () { | ||
var ctx = document.getElementById('canvas').getContext('2d'); | ||
window.myBar = new Chart(ctx, { | ||
type: 'bar', | ||
data: barChartData, | ||
options: { | ||
title: { | ||
display: true, | ||
}, | ||
tooltips: { | ||
mode: 'index', | ||
intersect: false | ||
}, | ||
responsive: true, | ||
scales: { | ||
xAxes: [{ | ||
stacked: true, | ||
barThickness: 50 | ||
}], | ||
yAxes: [{ | ||
stacked: true, | ||
}] | ||
} | ||
} | ||
}); | ||
}; | ||
|
||
</script> |
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 @@ | ||
TODO: Related |
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 @@ | ||
TODO: Table |
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 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
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