Completed
Pull Request — master (#163)
by Corey
03:24
created

site/web/js/checkin/report.js   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
dl 0
loc 20
rs 9.4285
c 3
b 0
f 0
cc 1
nc 1
nop 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A $(document).ready 0 18 1
1
(function($, Chart) {
2
  $(document).ready(function() {
3
    Chart.defaults.global.responsive = true;
4
    Chart.defaults.global.scaleBeginAtZero = true;
5
6
    var pie_ctx = document.getElementById('category-pie-chart').getContext('2d');
7
8
    var pie_data = JSON.parse(document.getElementById('pie_data').innerHTML);
9
10
    var pieChart = new Chart(pie_ctx, {
0 ignored issues
show
Unused Code introduced by
The variable pieChart seems to be never used. Consider removing it.
Loading history...
11
      type: 'pie',
12
      data: pie_data,
13
      options: {
14
        legend: {
15
          display: false
16
        }
17
      }
18
    });
19
  });
20
})(jQuery, Chart)
0 ignored issues
show
Bug introduced by
The variable Chart seems to be never declared. If this is a global, consider adding a /** global: Chart */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
21