aboutsummaryrefslogtreecommitdiffstats
path: root/tmpl/donations.html
diff options
context:
space:
mode:
Diffstat (limited to 'tmpl/donations.html')
-rw-r--r--tmpl/donations.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/tmpl/donations.html b/tmpl/donations.html
index fef42b4..435b95d 100644
--- a/tmpl/donations.html
+++ b/tmpl/donations.html
@@ -2,6 +2,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>[% config.sitename %] Donations</title>
+ [% INCLUDE head_chart.html %]
</head>
<body>
[%- USE date(format='%Y/%m/%d') -%]
@@ -20,6 +21,31 @@
</ul>
<h3>Donations per year</h3>
+
+ <canvas id="donations_history_bar_chart" height="250" width="[% 80 + donations.by_year.keys.size * 65 %]"></canvas>
+
+ <script>
+
+ var barChartData = {
+ labels : ["[% donations.by_year.keys.sort.reverse.join('","') %]"],
+ datasets : [
+ {
+ fillColor : "#151f79",
+ strokeColor : "#101333",
+ data : [
+ [%- FOR year IN donations.by_year.keys.sort.reverse -%]
+ [%- donations.by_year.$year.total -%]
+ [%- IF ! loop.last() -%],[%- END -%]
+ [%- END %]]
+ }
+ ]
+
+ }
+
+ var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData);
+
+ </script>
+
<ul>
[%- FOR year IN donations.by_year.keys.sort.reverse %]
<li><a href="donations_y_[% year %].html">[% year %]: [% donations.by_year.$year.total %] Euros</a></li>