diff options
-rw-r--r-- | tmpl/donations.html | 29 | ||||
-rw-r--r-- | tmpl/donations_by_year.html | 29 | ||||
-rw-r--r-- | tmpl/index.html | 47 | ||||
-rw-r--r-- | tmpl/transactions_by_year.html | 48 |
4 files changed, 75 insertions, 78 deletions
diff --git a/tmpl/donations.html b/tmpl/donations.html index 937fb39..908a774 100644 --- a/tmpl/donations.html +++ b/tmpl/donations.html @@ -26,23 +26,22 @@ <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 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); + var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData); </script> diff --git a/tmpl/donations_by_year.html b/tmpl/donations_by_year.html index c844e1a..be41454 100644 --- a/tmpl/donations_by_year.html +++ b/tmpl/donations_by_year.html @@ -24,23 +24,22 @@ <script> - var barChartData = { - labels : ["[% donations.by_year.$year.months.sort.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data : [ - [%- FOR month IN donations.by_year.$year.months.sort -%] - [%- donations.by_month.$month.total -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - } - ] - + var barChartData = { + labels : ["[% donations.by_year.$year.months.sort.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data : [ + [%- FOR month IN donations.by_year.$year.months.sort -%] + [%- donations.by_month.$month.total -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] } + ] + } - var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData); + var myLine = new Chart(document.getElementById("donations_history_bar_chart").getContext("2d")).Bar(barChartData); </script> [% END %] diff --git a/tmpl/index.html b/tmpl/index.html index 2c3749f..c4d71bd 100644 --- a/tmpl/index.html +++ b/tmpl/index.html @@ -126,32 +126,31 @@ <script> - var barChartData = { - labels : ["[% transactions.by_year.keys.sort.reverse.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data : [ - [%- FOR year IN transactions.by_year.keys.sort.reverse -%] - [%- transactions.by_year.$year.revenues -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - }, - { - fillColor : "#e51b1b", - strokeColor : "#f11111", - data: [ - [%- FOR year IN transactions.by_year.keys.sort.reverse -%] - [%- transactions.by_year.$year.expenses -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - } - ] - + var barChartData = { + labels : ["[% transactions.by_year.keys.sort.reverse.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data : [ + [%- FOR year IN transactions.by_year.keys.sort.reverse -%] + [%- transactions.by_year.$year.revenues -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + }, + { + fillColor : "#e51b1b", + strokeColor : "#f11111", + data: [ + [%- FOR year IN transactions.by_year.keys.sort.reverse -%] + [%- transactions.by_year.$year.expenses -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] } + ] + } - var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); + var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); </script> diff --git a/tmpl/transactions_by_year.html b/tmpl/transactions_by_year.html index b363c72..abe7e58 100644 --- a/tmpl/transactions_by_year.html +++ b/tmpl/transactions_by_year.html @@ -109,32 +109,32 @@ <script> - var barChartData = { - labels : ["[% transactions.by_year.$year.months.sort.join('","') %]"], - datasets : [ - { - fillColor : "#151f79", - strokeColor : "#101333", - data : [ - [%- FOR month IN transactions.by_year.$year.months.sort -%] - [%- transactions.by_month.$month.revenues -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - }, - { - fillColor : "#e51b1b", - strokeColor : "#f11111", - data: [ - [%- FOR month IN transactions.by_year.$year.months.sort -%] - [%- transactions.by_month.$month.expenses -%] - [%- IF ! loop.last() -%],[%- END -%] - [%- END %]] - } - ] - + var barChartData = { + labels : ["[% transactions.by_year.$year.months.sort.join('","') %]"], + datasets : [ + { + fillColor : "#151f79", + strokeColor : "#101333", + data : [ + [%- FOR month IN transactions.by_year.$year.months.sort -%] + [%- transactions.by_month.$month.revenues -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] + }, + { + fillColor : "#e51b1b", + strokeColor : "#f11111", + data: [ + [%- FOR month IN transactions.by_year.$year.months.sort -%] + [%- transactions.by_month.$month.expenses -%] + [%- IF ! loop.last() -%],[%- END -%] + [%- END %]] } + ] + + } - var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); + var myLine = new Chart(document.getElementById("accounts_history_bar_chart").getContext("2d")).Bar(barChartData); </script> |