Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | (function () { |
||
2 | $(document).ready(function () { |
||
3 | |||
4 | $(".chart-wrapper").each(function () { |
||
5 | var chartType = $(this).data("chart-type"); |
||
6 | if ( chartType === undefined ) { |
||
7 | return false; |
||
8 | } |
||
9 | var data = $(this).data("chart-data"); |
||
10 | var labels = $(this).data("chart-labels"); |
||
11 | var $ctx = $("canvas", $(this)); |
||
12 | new Chart($ctx, { |
||
13 | type: chartType, |
||
14 | data: { |
||
15 | labels: labels, |
||
16 | datasets: [ { data: data } ] |
||
17 | } |
||
18 | }); |
||
19 | }); |
||
20 | |||
21 | }); |
||
22 | } )(); |
||
23 |
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.