summaryrefslogtreecommitdiff
path: root/app/Template/analytic
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/analytic
parent1465ca1ae1510cd399b8f408ce7bf8058ed26955 (diff)
Replace dimplejs by c3js for chart drawing
Diffstat (limited to 'app/Template/analytic')
-rw-r--r--app/Template/analytic/burndown.php2
-rw-r--r--app/Template/analytic/cfd.php4
-rw-r--r--app/Template/analytic/layout.php4
-rw-r--r--app/Template/analytic/tasks.php2
-rw-r--r--app/Template/analytic/users.php2
5 files changed, 7 insertions, 7 deletions
diff --git a/app/Template/analytic/burndown.php b/app/Template/analytic/burndown.php
index 839573be..48a4c1c1 100644
--- a/app/Template/analytic/burndown.php
+++ b/app/Template/analytic/burndown.php
@@ -6,7 +6,7 @@
<p class="alert"><?= t('Not enough data to show the graph.') ?></p>
<?php else: ?>
<section id="analytic-burndown">
- <div id="chart" data-url="<?= $this->url->href('analytic', 'burndown', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>" data-label-total="<?= t('Total for all columns') ?>"></div>
</section>
<?php endif ?>
diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php
index 26696b31..ab706d56 100644
--- a/app/Template/analytic/cfd.php
+++ b/app/Template/analytic/cfd.php
@@ -3,10 +3,10 @@
</div>
<?php if (! $display_graph): ?>
- <p class="alert"><?= t('Not enough data to show the graph.') ?></p>
+ <p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p>
<?php else: ?>
<section id="analytic-cfd">
- <div id="chart" data-url="<?= $this->url->href('analytic', 'cfd', array('project_id' => $project['id'], 'from' => $values['from'], 'to' => $values['to'])) ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>"></div>
</section>
<?php endif ?>
diff --git a/app/Template/analytic/layout.php b/app/Template/analytic/layout.php
index de8d0de9..72aab4d8 100644
--- a/app/Template/analytic/layout.php
+++ b/app/Template/analytic/layout.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') ?>
<section id="main">
<div class="page-header">
diff --git a/app/Template/analytic/tasks.php b/app/Template/analytic/tasks.php
index faa4bacc..36f36a23 100644
--- a/app/Template/analytic/tasks.php
+++ b/app/Template/analytic/tasks.php
@@ -7,7 +7,7 @@
<?php else: ?>
<section id="analytic-task-repartition">
- <div id="chart" data-url="<?= $this->url->href('analytic', 'tasks', array('project_id' => $project['id'])) ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics) ?>'></div>
<table>
<tr>
diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php
index 982ef206..263ea0ef 100644
--- a/app/Template/analytic/users.php
+++ b/app/Template/analytic/users.php
@@ -7,7 +7,7 @@
<?php else: ?>
<section id="analytic-user-repartition">
- <div id="chart" data-url="<?= $this->url->href('analytic', 'users', array('project_id' => $project['id'])) ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics) ?>'></div>
<table>
<tr>