summaryrefslogtreecommitdiff
path: root/includes/helper
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-09-29 12:45:06 +0200
committermsquare <msquare@notrademark.de>2016-09-29 12:45:06 +0200
commit07ddbb0f4c76253b1d888ceab555bdf26992fd01 (patch)
tree9c4b6f3528e144bf675c78c6ddae848bf41c2cd6 /includes/helper
parentc231070dcc91d976a879674dd3fae7972cb064cf (diff)
make short variable names longer
Diffstat (limited to 'includes/helper')
-rw-r--r--includes/helper/graph_helper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/helper/graph_helper.php b/includes/helper/graph_helper.php
index 180d1ef9..42a6c07a 100644
--- a/includes/helper/graph_helper.php
+++ b/includes/helper/graph_helper.php
@@ -7,7 +7,7 @@
* @param unknown $colors colors for the data rows
* @param unknown $data the data
*/
-function bargraph($id, $key, $row_names, $colors, $data) {
+function bargraph($dom_id, $key, $row_names, $colors, $data) {
$labels = [];
foreach ($data as $dataset) {
$labels[] = $dataset[$key];
@@ -26,10 +26,10 @@ function bargraph($id, $key, $row_names, $colors, $data) {
];
}
- return '<canvas id="' . $id . '" style="width: 100%; height: 300px;"></canvas>
+ return '<canvas id="' . $dom_id . '" style="width: 100%; height: 300px;"></canvas>
<script type="text/javascript">
$(function(){
- var ctx = $("#' . $id . '").get(0).getContext("2d");
+ var ctx = $("#' . $dom_id . '").get(0).getContext("2d");
var chart = new Chart(ctx).Bar(' . json_encode([
'labels' => $labels,
'datasets' => $datasets