Completed
Push — develop ( d30da6...2bfc38 )
by Seth
03:06
created

graphs.turnAroundComparison   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 3
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A 0 3 1
1
/*jslint browser */
2
/*global $,fetch,Chart */
3
var graphs = {
4
    turnAroundComparison: function (domId, course_id, department_id = false) {
5
        fetch("chart/turn-around-comparison.php?course_id=" + course_id + (department_id !== false ? "&department_id=" + department_id : ""))
6
            .then(function (response) {
7
                return response.json();
8
            }).then(function (data) {
9
                var tac = new Chart($(domId), data);
10
                console.log(tac);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
11
            });
12
    }
13
};
14