summaryrefslogtreecommitdiff
path: root/app/Template/budget/index.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-06-21 21:12:24 -0400
committerFrederic Guillot <fred@kanboard.net>2015-06-21 21:12:24 -0400
commit81e40e2c910f0be3f6031445a4d2c1714cdeb385 (patch)
treed571857cff71af4e351327edc70e971758259239 /app/Template/budget/index.php
parent1465ca1ae1510cd399b8f408ce7bf8058ed26955 (diff)
Replace dimplejs by c3js for chart drawing
Diffstat (limited to 'app/Template/budget/index.php')
-rw-r--r--app/Template/budget/index.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/Template/budget/index.php b/app/Template/budget/index.php
index 4fe8ac69..3b594017 100644
--- a/app/Template/budget/index.php
+++ b/app/Template/budget/index.php
@@ -1,5 +1,5 @@
-<?= $this->asset->js('assets/js/vendor/d3.v3.4.8.min.js') ?>
-<?= $this->asset->js('assets/js/vendor/dimple.v2.1.2.min.js') ?>
+<?= $this->asset->js('assets/js/vendor/d3.v3.min.js') ?>
+<?= $this->asset->js('assets/js/vendor/c3.min.js') ?>
<div class="page-header">
<h2><?= t('Budget overview') ?></h2>
@@ -8,7 +8,8 @@
<?php if (! empty($daily_budget)): ?>
<div id="budget-chart">
<div id="chart"
- data-serie='<?= json_encode($daily_budget) ?>'
+ data-date-format="<?= e('%%Y-%%m-%%d') ?>"
+ data-metrics='<?= json_encode($daily_budget) ?>'
data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type'))) ?>'></div>
</div>
<hr/>