6464 <script src="js/d3.min.js" type="text/javascript"></script>
6565 <script src="js/nv.d3.min.js" type="text/javascript"></script>
6666 <script type="text/javascript">
67- $(document).ready(function() {{
68- nv.addGraph(function() {{
67+ $(document).ready(function() {
68+ nv.addGraph(function() {
6969 var chart = nv.models.multiBarChart();
7070 chart.tooltips(false)
7171 .showControls(false)
@@ -81,9 +81,9 @@ $(document).ready(function() {{
8181 nv.utils.windowResize(chart.update);
8282
8383 return chart;
84- }} );
84+ });
8585
86- function getCoverageDistributionData(data, label) {{
86+ function getCoverageDistributionData(data, label) {
8787 var labels = [
8888 '0%',
8989 '0-10%',
@@ -99,29 +99,29 @@ $(document).ready(function() {{
9999 '100%'
100100 ];
101101 var values = [];
102- $.each(labels, function(key) {{
103- values.push({{ x: labels[key], y: data[key]} });
104- }} );
102+ $.each(labels, function(key) {
103+ values.push({x: labels[key], y: data[key]});
104+ });
105105
106106 return [
107- {{
107+ {
108108 key: label,
109109 values: values,
110110 color: "#4572A7"
111- }}
111+ }
112112 ];
113- }}
113+ }
114114
115- nv.addGraph(function() {{
115+ nv.addGraph(function() {
116116 var chart = nv.models.scatterChart()
117117 .showDistX(true)
118118 .showDistY(true)
119119 .showLegend(false)
120120 .forceX([0, 100]);
121121 chart.scatter.onlyCircles(false);
122- chart.tooltipContent(function(key, y, e, graph) {{
122+ chart.tooltipContent(function(key, y, e, graph) {
123123 return '<p>' + graph.point.class + '</p>';
124- }} );
124+ });
125125
126126 chart.xAxis.axisLabel('Code Coverage (in percent)');
127127 chart.yAxis.axisLabel('Cyclomatic Complexity');
@@ -135,30 +135,30 @@ $(document).ready(function() {{
135135 nv.utils.windowResize(chart.update);
136136
137137 return chart;
138- }} );
138+ });
139139
140- function getComplexityData(data, label) {{
140+ function getComplexityData(data, label) {
141141 var values = [];
142- $.each(data, function(key) {{
142+ $.each(data, function(key) {
143143 var value = Math.round(data[key][0]*100) / 100;
144- values.push({{
144+ values.push({
145145 x: value,
146146 y: data[key][1],
147147 class: data[key][2],
148148 size: 0.05,
149149 shape: 'diamond'
150- }} );
151- }} );
150+ });
151+ });
152152
153153 return [
154- {{
154+ {
155155 key: label,
156156 values: values,
157157 color: "#4572A7"
158- }}
158+ }
159159 ];
160- }}
161- }} );
160+ }
161+ });
162162 </script>
163163 </body>
164164</html>
0 commit comments