comparison graph.html @ 20:3bb3d9a9f1b7

Filter by keywords and states. Configuration via configuration file. "No prio" grapf is displayed. (./display_issues_demo.py is not yet dynamic, it needs all states)
author Magnus Schieder <mschieder@intevation.de>
date Mon, 22 Oct 2018 16:49:58 +0200
parents f198a92dd37f
children 7161ce4e7ab1
comparison
equal deleted inserted replaced
19:8ffd584065a4 20:3bb3d9a9f1b7
72 72
73 .line.wish.legend { 73 .line.wish.legend {
74 fill: blue; 74 fill: blue;
75 } 75 }
76 76
77 .line.noprio {
78 stroke: grey;
79 }
80
81 .line.noprio.legend {
82 fill: grey;
83 }
84
77 .grid .tick { 85 .grid .tick {
78 stroke: lightgrey; 86 stroke: lightgrey;
79 opacity: 0.7; 87 opacity: 0.7;
80 } 88 }
81 89
84 } 92 }
85 93
86 </style> 94 </style>
87 </head> 95 </head>
88 <body> 96 <body>
97 <h1>Filter</h1>
98 <p>States: status</p>
99 <p>Keywords: keywords</p>
89 <div id="content" style="display: inline-block"></div> 100 <div id="content" style="display: inline-block"></div>
90 <script type="text/javascript" src="d3.v3.min.js"></script> 101 <script type="text/javascript" src="d3.v3.min.js"></script>
91 <script type="text/javascript"> 102 <script type="text/javascript">
92 103
93 window.onresize = function(){ 104 window.onresize = function(){
98 var critical=[]; 109 var critical=[];
99 var urgent=[]; 110 var urgent=[];
100 var bug=[]; 111 var bug=[];
101 var feature=[]; 112 var feature=[];
102 var wish=[]; 113 var wish=[];
114 var noPrio=[];
103 var timestamp=[]; 115 var timestamp=[];
104 116
105 117
106 118
107 function assignIssueToDate(issueArray, dateArray){ 119 function assignIssueToDate(issueArray, dateArray){
137 maxIssuesOfAllArrays.push(maxInObject(critical)); 149 maxIssuesOfAllArrays.push(maxInObject(critical));
138 maxIssuesOfAllArrays.push(maxInObject(urgent)); 150 maxIssuesOfAllArrays.push(maxInObject(urgent));
139 maxIssuesOfAllArrays.push(maxInObject(bug)); 151 maxIssuesOfAllArrays.push(maxInObject(bug));
140 maxIssuesOfAllArrays.push(maxInObject(feature)); 152 maxIssuesOfAllArrays.push(maxInObject(feature));
141 maxIssuesOfAllArrays.push(maxInObject(wish)); 153 maxIssuesOfAllArrays.push(maxInObject(wish));
154 maxIssuesOfAllArrays.push(maxInObject(noPrio));
142 155
143 return Math.max.apply(Math, maxIssuesOfAllArrays)+1; 156 return Math.max.apply(Math, maxIssuesOfAllArrays)+1;
144 } 157 }
145 158
146 159
212 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Critical", critical[critical.length-1].points); 225 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Critical", critical[critical.length-1].points);
213 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Urgent", urgent[urgent.length-1].points); 226 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Urgent", urgent[urgent.length-1].points);
214 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Bug", bug[bug.length-1].points); 227 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Bug", bug[bug.length-1].points);
215 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Feature", feature[feature.length-1].points); 228 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Feature", feature[feature.length-1].points);
216 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Wish", wish[wish.length-1].points); 229 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "Wish", wish[wish.length-1].points);
230 draw_legend_line(svg, legend_distance, set_propper_distance(distance_steps), "NoPrio", noPrio[noPrio.length-1].points);
217 } 231 }
218 232
219 233
220 234
221 //draw the chart 235 //draw the chart
241 var criticalLine = base_line; 255 var criticalLine = base_line;
242 var urgentLine = base_line; 256 var urgentLine = base_line;
243 var bugLine = base_line; 257 var bugLine = base_line;
244 var featureLine = base_line; 258 var featureLine = base_line;
245 var wishLine = base_line; 259 var wishLine = base_line;
260 var noPrioLine = base_line;
246 var timestampLine = base_line; 261 var timestampLine = base_line;
247 262
248 263
249 //set domain of y axis 264 //set domain of y axis
250 var yDomain = [ ]; 265 var yDomain = [ ];
348 draw_line(svg, wish, "line wish", wishLine, "0, 0"); 363 draw_line(svg, wish, "line wish", wishLine, "0, 0");
349 draw_line(svg, feature, "line feature", featureLine, "3, 3"); 364 draw_line(svg, feature, "line feature", featureLine, "3, 3");
350 draw_line(svg, bug, "line bug", bugLine, "7, 7"); 365 draw_line(svg, bug, "line bug", bugLine, "7, 7");
351 draw_line(svg, urgent, "line urgent", urgentLine, "13, 13"); 366 draw_line(svg, urgent, "line urgent", urgentLine, "13, 13");
352 draw_line(svg, critical, "line critical", criticalLine, "17, 17"); 367 draw_line(svg, critical, "line critical", criticalLine, "17, 17");
368 draw_line(svg, noPrio, "line noprio", noPrioLine, "17, 17");
353 369
354 370
355 makeLegend(svg, width); 371 makeLegend(svg, width);
356 372
357 373
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)