Mercurial > roundup-cc
annotate graph.html @ 22:33d7c7769155
Fix typos in TODO.creole (minor)
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Fri, 02 Nov 2018 10:38:21 +0100 |
parents | 3bb3d9a9f1b7 |
children | 7161ce4e7ab1 |
rev | line source |
---|---|
0 | 1 <!DOCTYPE html> |
2 <html> | |
3 <head> | |
4 <title> Issues </title> | |
5 <style type = text/css> | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
6 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
7 * { |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
8 font-family: "Sans-serif"; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
9 font-size: 14px; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
10 } |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
11 |
0 | 12 .svg div{ |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
13 font: 10px; |
0 | 14 text-align: right; |
15 float: left; | |
16 display: block; | |
17 padding: 10px; | |
18 margin: 10px; | |
19 color: white; | |
20 } | |
21 | |
22 .axis path, | |
23 | |
24 .axis line { | |
25 fill: none; | |
26 stroke: black; | |
27 stroke-width: 1px; | |
28 } | |
29 | |
30 .line { | |
31 fill: none; | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
32 stroke-width: 3px; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
33 opacity: 1; |
0 | 34 } |
35 | |
36 .line.critical { | |
37 stroke: red; | |
38 } | |
39 | |
40 .line.critical.legend { | |
41 fill: red; | |
42 } | |
43 | |
44 .line.urgent { | |
45 stroke: orange; | |
46 } | |
47 | |
48 .line.urgent.legend { | |
49 fill: orange; | |
50 } | |
51 | |
52 .line.bug { | |
53 stroke: violet; | |
54 } | |
55 | |
56 .line.bug.legend { | |
57 fill: violet; | |
58 } | |
59 | |
60 .line.feature { | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
61 stroke: chartreuse; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
62 style: stroke-dasharray; |
0 | 63 } |
64 | |
65 .line.feature.legend { | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
66 fill: chartreuse; |
0 | 67 } |
68 | |
69 .line.wish { | |
70 stroke: blue; | |
71 } | |
72 | |
73 .line.wish.legend { | |
74 fill: blue; | |
75 } | |
76 | |
20
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
77 .line.noprio { |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
78 stroke: grey; |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
79 } |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
80 |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
81 .line.noprio.legend { |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
82 fill: grey; |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
83 } |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
84 |
0 | 85 .grid .tick { |
86 stroke: lightgrey; | |
87 opacity: 0.7; | |
88 } | |
89 | |
90 .grid path { | |
91 stroke-width: 0; | |
92 } | |
93 | |
94 </style> | |
95 </head> | |
96 <body> | |
20
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
97 <h1>Filter</h1> |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
98 <p>States: status</p> |
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
99 <p>Keywords: keywords</p> |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
100 <div id="content" style="display: inline-block"></div> |
0 | 101 <script type="text/javascript" src="d3.v3.min.js"></script> |
102 <script type="text/javascript"> | |
103 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
104 window.onresize = function(){ |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
105 document.getElementById("content").innerHTML = ""; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
106 makeChart(); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
107 }; |
0 | 108 |
109 var critical=[]; | |
110 var urgent=[]; | |
111 var bug=[]; | |
112 var feature=[]; | |
113 var wish=[]; | |
20
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
114 var noPrio=[]; |
0 | 115 var timestamp=[]; |
116 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
117 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
118 |
0 | 119 function assignIssueToDate(issueArray, dateArray){ |
120 a = []; | |
121 for (var i = 0; i < issueArray.length; i++) { | |
122 a.push({points: issueArray[i].points, date : dateArray[i].date}); | |
123 } | |
124 | |
125 return a; | |
126 } | |
127 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
128 function limitDatesOnXAxis(limit){ |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
129 if ( timestamp.length < limit ){ |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
130 return timestamp.length; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
131 } else { |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
132 return limit; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
133 } |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
134 } |
0 | 135 |
136 function maxInObject( array ){ | |
137 var maxVal = 0; | |
138 for (var i = 0; i < array.length; i++) { | |
139 if (maxVal < array[i].points){ | |
140 maxVal = array[i].points; | |
141 } | |
142 } | |
143 return maxVal; | |
144 } | |
145 | |
146 | |
147 function getMaxIssues(){ | |
148 maxIssuesOfAllArrays = []; | |
149 maxIssuesOfAllArrays.push(maxInObject(critical)); | |
150 maxIssuesOfAllArrays.push(maxInObject(urgent)); | |
151 maxIssuesOfAllArrays.push(maxInObject(bug)); | |
152 maxIssuesOfAllArrays.push(maxInObject(feature)); | |
153 maxIssuesOfAllArrays.push(maxInObject(wish)); | |
20
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
154 maxIssuesOfAllArrays.push(maxInObject(noPrio)); |
0 | 155 |
156 return Math.max.apply(Math, maxIssuesOfAllArrays)+1; | |
157 } | |
158 | |
159 | |
160 function dayDifference(first, second) { | |
161 "use strict"; | |
162 var difference = (second - first) / (1000 * 60 * 60 * 24); | |
163 | |
164 // just to avoid the get thousands of lines... would look ugly. | |
165 if (difference > 60){ | |
166 difference = 60; | |
167 } | |
168 | |
169 return difference; | |
170 } | |
171 | |
172 | |
173 // function for the grid lines | |
174 function makeGrid(direction, orientation, ticknumber) { | |
175 return d3.svg.axis() | |
176 .scale(direction) | |
177 .orient(orientation) | |
178 .ticks( ticknumber ); | |
179 } | |
180 | |
181 | |
182 //append a svg_path. pretty generic | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
183 function draw_line(svg, data_array, css_class, line_object, lineShape){ |
0 | 184 svg.append("path") |
185 .datum(assignIssueToDate(data_array, timestamp)) | |
186 .attr("class", css_class) | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
187 .style("stroke-dasharray", (lineShape)) |
0 | 188 .attr("d", line_object); |
189 } | |
190 | |
191 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
192 function makeLegend(svg, width){ |
0 | 193 |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
194 var legend_distance = width+40; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
195 var top_distance = 20; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
196 var distance_steps = 50; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
197 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
198 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
199 function set_propper_distance(steps){ |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
200 top_distance += steps; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
201 return top_distance; |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
202 } |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
203 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
204 function draw_legend_line(svg, width, Ypos, text, issues){ |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
205 svg.append("svg:text") |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
206 .attr("class", "legend") |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
207 .attr("x", width-30 ) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
208 .attr("y", Ypos) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
209 .text(text + ":"); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
210 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
211 svg.append("svg:text") |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
212 .attr("class", "legend") |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
213 .attr("x", width+35 ) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
214 .attr("y", Ypos) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
215 .text(issues); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
216 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
217 svg.append("rect") |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
218 .attr("class", "line " + text.toLowerCase() + " legend") |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
219 .attr("x", width-30) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
220 .attr("y", Ypos-20) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
221 .attr("width", 100) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
222 .attr("height", 2); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
223 } |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
224 |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
225 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Critical", critical[critical.length-1].points); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
226 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Urgent", urgent[urgent.length-1].points); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
227 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Bug", bug[bug.length-1].points); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
228 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Feature", feature[feature.length-1].points); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
229 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Wish", wish[wish.length-1].points); |
20
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
230 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "NoPrio", noPrio[noPrio.length-1].points); |
0 | 231 } |
232 | |
233 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
234 |
0 | 235 //draw the chart |
236 function makeChart(){ | |
237 | |
238 //declaration | |
239 var sizeOfSystemBorders = 50; | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
240 var margin = {top: 20, right: 100, bottom: 90, left: 60}, |
0 | 241 width = (document.documentElement.clientWidth-sizeOfSystemBorders) - margin.left - margin.right, |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
242 height = (document.documentElement.clientHeight-sizeOfSystemBorders) - margin.top - margin.bottom; |
0 | 243 |
244 var x = d3.time.scale() | |
245 .range([0, width]); | |
246 | |
247 var y = d3.scale.linear() | |
248 .range([height, 0]); | |
249 | |
250 var base_line = d3.svg.line() | |
251 .x(function(d) { return x(d.date); }) | |
252 .y(function(d) { return y(d.points); }); | |
253 | |
254 //lines | |
255 var criticalLine = base_line; | |
256 var urgentLine = base_line; | |
257 var bugLine = base_line; | |
258 var featureLine = base_line; | |
259 var wishLine = base_line; | |
20
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
260 var noPrioLine = base_line; |
0 | 261 var timestampLine = base_line; |
262 | |
263 | |
264 //set domain of y axis | |
265 var yDomain = [ ]; | |
266 yDomain[0] = 0; | |
267 yDomain[1] = getMaxIssues(); | |
268 y.domain(d3.extent(yDomain, function(d){return d; })); | |
269 | |
270 //set domain of y axis | |
271 x.domain(d3.extent(timestamp, function(d){return d.date; })); | |
272 | |
273 | |
274 var xAxis = d3.svg.axis() | |
275 .scale(x) | |
276 .orient("bottom") | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
277 .ticks(limitDatesOnXAxis(10)) |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
278 .tickFormat(d3.time.format("%d.%m:%H:%M")); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
279 // .tickFormat(d3.time.format("%X")); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
280 // .tickFormat(d3.time.format.iso); |
0 | 281 |
282 | |
283 var yAxis = d3.svg.axis() | |
284 .scale(y) | |
285 .orient("left"); | |
286 | |
287 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
288 var svg = d3.select("#content") |
0 | 289 .append("svg") |
290 .attr("class", "svg") | |
291 .attr("width", width + margin.left + margin.right) | |
292 .attr("height", height + margin.top + margin.bottom) | |
293 .append("g") | |
294 .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); | |
295 | |
296 | |
297 // creation | |
298 | |
299 | |
300 // Draw the x Grid lines | |
11
f198a92dd37f
Do not render vertical grid lines
Gernot Schulz <gernot@intevation.de>
parents:
1
diff
changeset
|
301 // svg.append("g") |
f198a92dd37f
Do not render vertical grid lines
Gernot Schulz <gernot@intevation.de>
parents:
1
diff
changeset
|
302 // .attr("class", "grid") |
f198a92dd37f
Do not render vertical grid lines
Gernot Schulz <gernot@intevation.de>
parents:
1
diff
changeset
|
303 // .attr("transform", "translate(0," + height + ")") |
f198a92dd37f
Do not render vertical grid lines
Gernot Schulz <gernot@intevation.de>
parents:
1
diff
changeset
|
304 // .call(makeGrid(x, "bottom", timestamp.length) |
f198a92dd37f
Do not render vertical grid lines
Gernot Schulz <gernot@intevation.de>
parents:
1
diff
changeset
|
305 // .tickSize(-height, 0, 0) |
f198a92dd37f
Do not render vertical grid lines
Gernot Schulz <gernot@intevation.de>
parents:
1
diff
changeset
|
306 // .tickFormat("") |
f198a92dd37f
Do not render vertical grid lines
Gernot Schulz <gernot@intevation.de>
parents:
1
diff
changeset
|
307 // ); |
0 | 308 |
309 | |
310 // Draw the y Grid lines | |
311 svg.append("g") | |
312 .attr("class", "grid") | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
313 .call(makeGrid(y, "left", function(){return Math.min(getMaxIssues(), 50);}()) |
0 | 314 .tickSize(-width, 0, 0) |
315 .tickFormat("") | |
316 ); | |
317 | |
318 | |
319 // Draw the x-axis | |
320 svg.append("g") | |
321 .attr("class", "x axis") | |
322 .attr("transform", "translate(0," + height + ")") | |
323 .call(xAxis) | |
324 .selectAll("text") | |
325 .style("text-anchor", "end") | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
326 .attr("dx", "-.5em") |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
327 .attr("dy", ".1em") |
0 | 328 .attr("transform", function() { |
329 return "rotate(-65)"; | |
330 }); | |
331 | |
332 | |
333 // Draw the y-axis | |
334 svg.append("g") | |
335 .attr("class", "y axis") | |
336 .call(yAxis) | |
337 .append("text") | |
338 .attr("transform", "rotate(-90)") | |
339 .attr("y", 6) | |
340 .attr("dy", ".71em") | |
341 .style("text-anchor", "end"); | |
342 | |
343 | |
344 // Text for y-axis | |
345 svg.append("text") | |
346 .attr("transform", "rotate(-90)") | |
347 .attr("y", 10 - margin.left) | |
348 .attr("x", 0 - (height / 2)) | |
349 .attr("dy", "1em") | |
350 .style("text-anchor", "middle") | |
351 .text("Issues"); | |
352 | |
353 | |
354 //Titel und Legende | |
355 | |
356 svg.append("svg:text") | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
357 .attr("class", "text") |
0 | 358 .attr("x", 10) |
359 .attr("y", -5) | |
360 .text("Issues Nach Zeit"); | |
361 | |
362 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
363 draw_line(svg, wish, "line wish", wishLine, "0, 0"); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
364 draw_line(svg, feature, "line feature", featureLine, "3, 3"); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
365 draw_line(svg, bug, "line bug", bugLine, "7, 7"); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
366 draw_line(svg, urgent, "line urgent", urgentLine, "13, 13"); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
367 draw_line(svg, critical, "line critical", criticalLine, "17, 17"); |
20
3bb3d9a9f1b7
Filter by keywords and states.
Magnus Schieder <mschieder@intevation.de>
parents:
11
diff
changeset
|
368 draw_line(svg, noPrio, "line noprio", noPrioLine, "17, 17"); |
0 | 369 |
370 | |
1
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
371 makeLegend(svg, width); |
2df45f6ecd81
new appereance (solid and dotted lines), resonsive layout, new legend,
sean
parents:
0
diff
changeset
|
372 |
0 | 373 |
374 } | |
375 | |
376 makeChart(); | |
377 | |
378 | |
379 </script> | |
380 </body> | |
381 </html> |