comparison modules/web_view/graph.html @ 26:d7856a645ea8

new db for techintern for testing purposes
author sean
date Fri, 14 Aug 2015 11:32:41 +0200
parents 05e5441c5160
children
comparison
equal deleted inserted replaced
25:05e5441c5160 26:d7856a645ea8
19 19
20 .axis line { 20 .axis line {
21 fill: none; 21 fill: none;
22 stroke: lightgrey; 22 stroke: lightgrey;
23 /*opacity: 0.7;*/ 23 /*opacity: 0.7;*/
24 /*stroke-width: 1px;*/ 24 stroke-width: 1px;
25 } 25 }
26 26
27 .y.axis path { 27 .y.axis path {
28 display: none; 28 display: none;
29 } 29 }
91 91
92 <script type="text/javascript" src="static/d3.v3.min.js"></script> 92 <script type="text/javascript" src="static/d3.v3.min.js"></script>
93 93
94 <script type="text/javascript"> 94 <script type="text/javascript">
95 95
96 var d3jsInjectionTarget="X";
97
96 // window.onresize = function(){ 98 // window.onresize = function(){
97 // document.getElementsByClassName("chart")[0].innerHTML = ""; 99 // document.getElementById(d3jsInjectionTarget).innerHTML = "";
98 // makeChart(); 100 // makeChart();
99 // }; 101 // };
100
101 var d3jsInjectionTarget="X";
102 102
103 var critical=[]; 103 var critical=[];
104 var urgent=[]; 104 var urgent=[];
105 var bug=[]; 105 var bug=[];
106 var feature=[]; 106 var feature=[];
107 var wish=[]; 107 var wish=[];
108 var timestamp=[]; 108 var timestamp=[];
109 109
110 // var critical=[
111 // {points: 4},
112 // {points: 12},
113 // {points: 8},
114 // {points: 2}
115 // ]
116 //
117 // var urgent=[
118 // {points: 3},
119 // {points: 24},
120 // {points: 17},
121 // {points: 19}
122 // ]
123 //
124 // var bug=[
125 // {points: 10},
126 // {points: 2},
127 // {points: 2},
128 // {points: 12}
129 // ]
130 //
131 // var feature=[
132 // {points: 4},
133 // {points: 21},
134 // {points: 12},
135 // {points: 4}
136 // ]
137 //
138 // var wish=[
139 // {points: 22},
140 // {points: 18},
141 // {points: 32},
142 // {points: 10}
143 // ]
144 //
145 //
146 // var timestamp=[
147 // {date : new Date('2015-06-30T12:36:47')},
148 // {date : new Date('2015-07-01T12:37:26')},
149 // {date : new Date('2015-07-02T12:38:26')},
150 // {date : new Date('2015-07-03T12:39:26')}
151 // ]
152
153 document.addEventListener("DOMContentLoaded", function(event) { 110 document.addEventListener("DOMContentLoaded", function(event) {
111 try {
112 document.getElementById(d3jsInjectionTarget).getElementsByClassName("svg")[0].innerHTML = ""
113 } catch (e) {
114 }
154 makeChart(); 115 makeChart();
155 }); 116 });
156 117
157 function assignIssueToDate(issueArray, dateArray){ 118 function assignIssueToDate(issueArray, dateArray){
158 a = []; 119 a = [];
309 270
310 271
311 var xAxis = d3.svg.axis() 272 var xAxis = d3.svg.axis()
312 .scale(x) 273 .scale(x)
313 .orient("bottom") 274 .orient("bottom")
314 .ticks(limitDatesOnXAxis(4)) 275 .ticks(limitDatesOnXAxis(10))
315 .tickFormat(d3.time.format("%d.%m")); 276 .tickFormat(d3.time.format("%d.%m"));
316 277
317 var yAxis = d3.svg.axis() 278 var yAxis = d3.svg.axis()
318 .scale(y) 279 .scale(y)
319 .orient("left"); 280 .orient("left");
399 draw_line(svg, critical, "line critical", criticalLine); 360 draw_line(svg, critical, "line critical", criticalLine);
400 361
401 362
402 // makeLegend(svg, width); 363 // makeLegend(svg, width);
403 } 364 }
404 365 // makeChart();
405 366
406 </script> 367 </script>
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)