Changeset a3e35d2517223a6ca61f6f09b43a3dd88076899d
- Timestamp:
- 04/28/09 22:49:46 (4 years ago)
- git-parent:
- Files:
-
- ui/web/htdocs/css/style.css (modified) (1 diff)
- ui/web/htdocs/graph_panel.inc (modified) (14 diffs)
- ui/web/htdocs/js/jquery.flot.js (modified) (19 diffs)
- ui/web/htdocs/js/recon.js (modified) (10 diffs)
- ui/web/lib/Reconnoiter_flot_Driver.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ui/web/htdocs/css/style.css
r9359348 ra3e35d2 879 879 padding:0 4px; 880 880 font-weight: bold; 881 color:#660000; 882 } 883 span.editStacks { 884 padding-left:10px; 885 float:right; 886 color:#660000; 887 } 888 span.graphStacks { 889 float:left; 890 border:1px solid #DDDDDD; 881 891 color:#660000; 882 892 } ui/web/htdocs/graph_panel.inc
rb2e6f6c ra3e35d2 25 25 $("input[@class='graphType']").attr("disabled", "true"); 26 26 $("select[@name='derive']").attr("disabled", "true"); 27 $("select[@class='av_stacks']").attr("disabled", "true"); 27 28 28 29 $("h2#graphTitle").unbind(); … … 35 36 $("input[@name='math2']").removeAttr("disabled"); 36 37 $("input[@name='view']").removeAttr("disabled"); 37 $("input[@class='graphType']").removeAttr("disabled");38 // $("input[@class='graphType']").removeAttr("disabled"); 38 39 $("select[@name='derive']").removeAttr("disabled"); 40 $("select[@class='av_stacks']").removeAttr("disabled"); 39 41 40 42 $("h2#graphTitle").editable(function(value, settings) { … … 151 153 }, 'json'); 152 154 } 155 153 156 function graph_add_datapoint(d) { 154 157 if(!graph_locked("Click 'Edit Graph' to unlock.")){ … … 222 225 } 223 226 }); 227 224 228 if(!d.hidden){o.find('input[@name="view"]').attr("checked","checked");} 225 229 o.find('input[@name="view"]').change(function(){ … … 228 232 }).change(); 229 233 234 o.find('select[@id="datastack"]').change(function(){ 235 var si = find_in_stacks($(".av_stacks").index(this)); 236 if(si != -1) graphinfo.stacks[si.i].splice(si.j, 1); 237 238 if(graphinfo.stacks[ $(this).val() ]) { 239 graphinfo.stacks[ $(this).val()].push($(".av_stacks").index(this)); 240 graphinfo.stacks[ $(this).val()].sort(function(a,b){return a - b}); 241 } 242 update_current_graph(true); 243 244 $(".graphStacks").empty(); 245 246 for(var i=0; i<graphinfo.stacks.length; i++) { 247 $(".graphStacks").append('<br>Stack '+i+': '); 248 for(var j=0; j<graphinfo.stacks[i].length; j++){ 249 $(".graphStacks").append(graphinfo.datapoints[graphinfo.stacks[i][j]].name + ","); 250 } 251 } 252 }).change(); 253 254 230 255 o.find('.deletedatapoint').click(function(){ 231 256 if(!locked){ … … 233 258 if(graphinfo.datapoints[i] == d) { 234 259 graphinfo.datapoints.splice(i,1); 260 var si = find_in_stacks(i); 261 if(si != -1) graphinfo.stacks[si.i].splice(si.j, 1); 235 262 break; 236 263 } … … 286 313 $("#gtool #dataPoints").append(o.children()); 287 314 } 315 316 function find_in_stacks(dnum) { 317 for(var i=0; i<graphinfo.stacks.length; i++) { 318 for(var j=0; j<graphinfo.stacks[i].length; j++) { 319 if(graphinfo.stacks[i][j] == dnum) { 320 var r = { i: i, j: j}; return r; 321 } 322 } 323 } 324 return -1; 325 } 326 288 327 function refresh_graph_from_json(j) { 289 328 graphinfo = j; 329 if(graphinfo.stacks == undefined) graphinfo.stacks = Array(); 290 330 if(graphinfo.datapoints == undefined) graphinfo.datapoints = Array(); 291 331 $("h2#graphTitle").html(graphinfo.title ? graphinfo.title : 'Graph Title (click to edit)'); … … 296 336 .attr("checked","checked"); 297 337 $("#dataPoints").empty(); 338 298 339 for(var i=0; i<graphinfo.datapoints.length; i++) { 299 340 gtool_add_datapoint(graphinfo.datapoints[i]); 300 341 } 342 343 $(".graphStacks").empty(); 344 $('.av_stacks').find('option').remove().end().append('<option value="-1">select </option>') 345 346 for(var i=0; i<graphinfo.stacks.length; i++) { 347 $(".graphStacks").append('<br>Stack '+i+': '); 348 $('.av_stacks').append('<option value="'+i+'">Stack '+i+'</option>'); 349 350 for(var j=0; j<graphinfo.stacks[i].length; j++){ 351 $(".graphStacks").append(graphinfo.datapoints[graphinfo.stacks[i][j]].name + ","); 352 } 353 } 354 355 $('select[@id="datastack"]').each( function() { 356 var si = find_in_stacks($(".av_stacks").index(this)); 357 if(si != -1) $(this).val(si.i); 358 }); 359 301 360 if(maingraph) { 302 361 if(graphinfo.id) 303 maingraph.ReconGraphRefresh({graphid: graphinfo.id, type: graphinfo.type });362 maingraph.ReconGraphRefresh({graphid: graphinfo.id, type: graphinfo.type, stacks: graphinfo.stacks}); 304 363 else 305 364 maingraph.ReconGraphReset(); … … 355 414 }); 356 415 357 416 $(".editStacks").click(function() { 417 if(!graph_locked("Unlock by clicking 'Edit Graph'.") && graphinfo.id) { 418 graphinfo.stacks.push([]); 419 var ns = graphinfo.stacks.length - 1; 420 $(".graphStacks").append('<p>Stack '+ns+'</p>'); 421 $('.av_stacks').append('<option value="'+ns+'">Stack '+ns+'</option>'); 422 update_current_graph(true); 423 } 424 }); 425 358 426 $(".streamData").click(function() { 359 360 427 if(!graph_locked("Unlock by clicking 'Edit Graph'.") && graphinfo.id) { 361 428 if(!gstreaming) { … … 419 486 $("#gtool-error").fadeOut("slow"); 420 487 }); 421 $(" span.addGuide").click(function() {488 $(".addGuide").click(function() { 422 489 if(!locked){ 423 490 gtool_add_guide(); … … 490 557 491 558 </div> 559 <span class="graphStacks"></span> 560 <div><span class="editStacks">Add Stack Set</span></div> 492 561 <div style="float:right"><span class="addGuide">Add Guide</span></div> 493 562 <br style="clear:right" /> … … 498 567 499 568 <th class="data">Data Points</th> 569 <th>Stacking</th> 500 570 <th>Color</th> 501 571 <th>Derivative</th> … … 512 582 <table> 513 583 <tbody id="guideeditor"> 514 <tr> 584 <tr> 515 585 <td><input name="view" type="checkbox" value="1" /></td> 516 586 <td class="data datatitle"></td> … … 536 606 <td><input name="view" type="checkbox" value="1"/></td> 537 607 <td class="data datatitle"></td> 608 <td><select id="datastack" class="av_stacks"><option value='na'>select</option></select></td> 538 609 <td><div class="colorPicker"><div class="colorSelector"><div style="background-color: #fff"></div></div><div class="colorPickerHolder"></div></div></td> 539 610 <td><select name="derive"><option value="false">no</option><option value="derive">derive</option><option value="counter">counter</option></select></td> ui/web/htdocs/js/jquery.flot.js
r42fc0f6 ra3e35d2 10 10 // where series is either just the data as [ [x1, y1], [x2, y2], ... ] 11 11 // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label" } 12 12 var orig_series; 13 13 14 var series = [], 14 15 options = { … … 120 121 this.highlight = highlight; 121 122 this.unhighlight = unhighlight; 122 123 123 124 // initialize 124 125 parseOptions(options_); … … 130 131 131 132 function setData(d) { 133 orig_series = copyData(d); 134 132 135 series = parseData(d); 133 134 // interpolateData(series); 135 136 136 137 fillInSeriesOptions(); 137 processData(); 138 } 139 140 function interpolateData(series){ 141 142 for (var i = 1; i < series.length; i++) { 143 var data = series[i].data; 144 var bdata = series[i-1].data; 145 console.log(bdata.length); 146 console.log(data.length); 147 for (var j = 0; j < bdata.length; j++) { 148 149 match = binary_search(data, bdata[j][0], bdata.length, 0); 150 // if(match.index>=0) console.log("found ", bdata[j][0]-3, " at ",match.index,"! see: ",data[match.index][0]); 151 // if( tindex != -1) data[tindex][1] += bdata[j][1]; 152 // interpolate 153 // else data.splice(i_top.below +1, 0, interpolate(data[i_top.below], data[i_top.below+1], bdata[j][0])); 138 139 for (var i = 0; i < series.length; i++) { 140 var daindex = findLowerInStacks(i); 141 if(daindex>-1) stackData(i, daindex); 142 } 143 processData(); 144 } 145 146 //finds the intersection of two line segments, given two points from each. intersection may be beyond points given 147 function findIntersect(p1,p2,p3,p4){ 148 rx = ( (p1.x*p2.y - p1.y*p2.x)*(p3.x-p4.x) - (p1.x-p2.x)*(p3.x*p4.y-p3.y*p4.x) ) / 149 ( (p1.x-p2.x)*(p3.y-p4.y) - (p1.y-p2.y)*(p3.x-p4.x) ); 150 151 ry = ( (p1.x*p2.y-p1.y*p2.x)*(p3.y-p4.y) - (p1.y-p2.y)*(p3.x*p4.y-p3.y*p4.x) ) / 152 ( (p1.x-p2.x)*(p3.y-p4.y) - (p1.y-p2.y)*(p3.x-p4.x) ); 153 154 var r = { x: rx, y: ry}; 155 return r; 156 157 } 158 function stackData(i, below_index){ 159 160 //if we get a bad index, or if the current series or the one below it are hidden, dont stack 161 if(!series[i] || !series[below_index] || !series[i].lines.show || !series[below_index].lines.show) return; 162 163 var bdata = series[below_index].data; 164 165 for (var j = 0; j < series[i].data.length; j++) { 166 if(series[i].data[j][1] && bdata[j][1]){ 167 match = binary_search(bdata, series[i].data[j][0], bdata.length-1, 0); 168 169 //if the dataset below this one has an exact timestamp match, stack the top dataset by adding it to the one above 170 if(match.found) { 171 series[i].data[j][1] = parseFloat(series[i].data[j][1]) + parseFloat(bdata[match.index][1])+''; 172 } 173 else if(match.index >=0 && match.index<bdata.length) { 174 // otherwise stack using the interpolated value from below 175 var lerp_val; 176 if(series[i].data[j][0]<bdata[match.index][0]) { 177 if(match.index>0) lerp_val = interpolate(bdata[match.index-1], bdata[match.index], series[i].data[j][0]); 178 else lerp_val = bdata[0][1]; 179 } 180 else if(series[i].data[j][0]>bdata[match.index][0]) { 181 if( (match.index+1) < bdata.length) lerp_val = interpolate(bdata[match.index], bdata[match.index+1], series[i].data[j][0]); 182 else lerp_val = bdata[bdata.length-1][1]; 183 } 184 series[i].data[j][1] = parseFloat(series[i].data[j][1]) + parseFloat(lerp_val) +''; 185 }//end if interpolating 186 } 187 }//end for each datapoint in current series 188 } 189 190 //returns the index the value v was found at, or the index below it that is closest, or -1 if it is lower than anything else 191 function binary_search(a, v, high, low) { 192 if(high < low) { 193 if(high==-1) {var r = { found: false, index: low}; return r;} 194 else if(low ==a.length) {var r = { found: false, index: high}; return r;} 195 else { 196 if(Math.abs(a[high][0]-v) < Math.abs(a[low][0]-v)){ var r = { found: false, index: high}; return r;} 197 else {var r = { found: false, index: low}; return r;} 154 198 } 155 199 } 156 } 157 //returns the index the item was found at, or the index below it that is closest, or -1 if it is lower than anything else 158 function binary_search(a, v, high, low) { 159 160 if(high <= low) { var r = { found: false, index: low-1}; return r;} 161 162 middle = parseInt(((high-low)/2)) + low; 163 164 if(middle>=a.length) console.log("high = ", high," low = ",low); 165 200 middle = parseInt(((high-low)/2))+ low; 201 if(middle>=a.length) { 202 } //bad index, somehow 166 203 if(a[middle][0] > v) return binary_search(a, v, middle-1, low); 167 204 else if(a[middle][0] < v) return binary_search(a, v, high, middle+1); … … 169 206 } 170 207 208 //this will lerp to the y value at x=t using points p1 and p2 171 209 function interpolate(p1, p2, t) { 172 210 dx = p2[0] - p1[0]; dy = p2[1] - p1[1]; 173 211 return (dy/dx)*(t-p1[0]) + p1[1]; 174 212 } 213 175 214 176 177 function parseData(d) { 215 //this will copy data only, ignoring other series variables 216 function copyData(d) { 217 var res = []; 218 219 for (var i = 0; i < d.length; ++i) { 220 var s = {data: []}; 221 if(d[i].data) { 222 for (var j=0; j<d[i].data.length; j++) { 223 s.data[j] = d[i].data[j].slice(); 224 } 225 for (var v in d[i]) { 226 if(!s[v]) s[v] = d[i][v]; 227 } 228 } 229 else { 230 for (var j=0; j<d[i].length; j++) { 231 s.data[j] = d[i][j].slice(); 232 } 233 } 234 res.push(s); 235 } 236 return res; 237 } 238 239 //this creates a new refernce to data 240 function parseData(d) { 178 241 var res = []; 179 242 for (var i = 0; i < d.length; ++i) { … … 186 249 else { 187 250 s = { data: d[i] }; 188 } 251 } 189 252 res.push(s); 190 253 } 191 254 192 255 return res; 193 256 } 194 257 195 258 function parseOptions(o) { 196 259 $.extend(true, options, o); … … 888 951 axes.y2axis.scale = plotHeight / (axes.y2axis.max - axes.y2axis.min); 889 952 } 890 953 954 function findLowerInStacks (i) { 955 956 var daindex = -1; 957 if(options.stackSets){ 958 for (var j=0; j<options.stackSets.length; j++) { 959 for (var k =1; k < options.stackSets[j].length; k++){ 960 if (options.stackSets[j][k] == i){ 961 for (var m=(k-1); m>=0; m--) { 962 daindex = options.stackSets[j][m]; 963 if( series[daindex].lines.show ) { 964 return daindex; 965 } 966 } 967 } 968 } 969 } 970 } 971 return -1; 972 } 973 891 974 function draw() { 892 975 drawGrid(); 976 977 var b_series = null; 978 893 979 for (var i = 0; i < series.length; i++) { 894 drawSeries(series[i]); 980 var daindex = findLowerInStacks(i); 981 if(daindex>-1) b_series = series[daindex]; 982 983 drawSeries(series[i], b_series); 895 984 } 896 985 } … … 1091 1180 } 1092 1181 1093 function drawSeries(series ) {1182 function drawSeries(series, b_series) { 1094 1183 1095 1184 //this module assumed we always want to show something, thus if nothing was set to show 1096 1185 //it plotted lines....sometimes, we dont wanna show anything 1097 1186 if (series.lines.show) // || (!series.bars.show && !series.points.show)) 1098 drawSeriesLines(series );1187 drawSeriesLines(series, b_series); 1099 1188 if (series.bars.show) 1100 1189 drawSeriesBars(series); … … 1103 1192 } 1104 1193 1105 function drawSeriesLines(series ) {1194 function drawSeriesLines(series, b_series) { 1106 1195 function plotLine(data, offset, axisx, axisy, dataManip) { 1107 1196 var prev, cur = null, drawx = null, drawy = null; … … 1186 1275 } 1187 1276 1188 function plotLineArea(data, axisx, axisy, dataManip) { 1277 function plotLineArea(data, axisx, axisy, dataManip, b_series) { 1278 1189 1279 var prev, cur = null; 1190 1280 var bprev, bcur = null; 1281 1282 //zero negative ymin, then find minimum of that and ymax for bottom 1191 1283 var bottom = Math.min(Math.max(0, axisy.min), axisy.max); 1192 1284 var top, lastX = 0; 1193 1285 1194 1286 var areaOpen = false; 1195 1287 var pcount = 0; 1288 var last_by = (b_series ? (b_series.data[b_series.data.length-1][1] ? b_series.data[b_series.data.length-1][1] : bottom) : bottom); 1289 var first_by = (b_series ? (b_series.data[0][1] ? b_series.data[0][1] : bottom) : bottom); 1290 1196 1291 for (var i = 0; i < data.length; ++i) { 1197 1292 prev = cur; 1198 1293 cur = [data[i][0], data[i][1]]; 1294 if(b_series){ 1295 bprev = bcur; 1296 bcur = [parseFloat(b_series.data[i][0]), parseFloat(b_series.data[i][1])]; 1297 } 1298 else { 1299 bprev = axisy.min; 1300 bcur = axisy.min; 1301 } 1302 1199 1303 if(dataManip) cur[1] = dataManip(cur[1]); 1200 1304 1201 if (areaOpen && prev != null && cur == null) { 1305 //close only if not stacked 1306 if (areaOpen && prev != null && cur == null && !b_series) { 1202 1307 // close area 1203 1308 ctx.lineTo(axisx.p2c(lastX), axisy.p2c(bottom)); … … 1212 1317 var x1 = prev[0], y1 = prev[1], 1213 1318 x2 = cur[0], y2 = cur[1]; 1319 var bx1 = bprev[0], by1 = bprev[1], 1320 bx2 = bcur[0], by2 = bcur[1]; 1321 1214 1322 1215 1323 // clip x values … … 1246 1354 // open area 1247 1355 ctx.beginPath(); 1248 ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom)); 1356 ctx.moveTo(axisx.p2c(x1), axisy.p2c(first_by)); 1249 1357 areaOpen = true; 1250 1358 } … … 1256 1364 continue; 1257 1365 } 1366 //if both points are below the ymin, clip the area by drawing only to ymin for both points 1367 //this should not be triggered for a stacked series 1258 1368 else if (y1 <= axisy.min && y2 <= axisy.min) { 1259 1369 ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min)); … … 1270 1380 1271 1381 // clip with ymin 1382 //this should not be triggered for a stacked series 1272 1383 if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) { 1273 1384 x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; 1274 1385 y1 = axisy.min; 1275 1386 } 1387 //this should not be triggered for a stacked series 1276 1388 else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) { 1277 1389 x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; … … 1292 1404 // if the x value was changed we got a rectangle 1293 1405 // to fill 1406 //this should not be triggered for a stacked series 1407 1294 1408 if (x1 != x1old) { 1295 1409 if (y1 <= axisy.min) … … 1303 1417 1304 1418 // fill the triangles 1305 ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1)); 1419 ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1)); 1306 1420 ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2)); 1307 1421 1308 1422 // fill the other rectangle if it's there 1423 //this should not be triggered for a stacked series 1309 1424 if (x2 != x2old) { 1310 1425 if (y2 <= axisy.min) … … 1320 1435 } 1321 1436 1322 if (areaOpen) { 1323 ctx.lineTo(axisx.p2c(lastX), axisy.p2c(bottom)); 1324 ctx.fill(); 1325 } 1326 } 1437 if(areaOpen){ 1438 if (!b_series) { 1439 ctx.lineTo(axisx.p2c(lastX), axisy.p2c(bottom)); 1440 ctx.fill(); 1441 } 1442 else { 1443 ctx.lineTo(axisx.p2c(lastX), axisy.p2c(last_by)); 1444 for (var i = b_series.data.length -1 ; i>=0 ; i--) { 1445 ctx.lineTo(axisx.p2c(b_series.data[i][0]), axisy.p2c(b_series.data[i][1])); 1446 } 1447 ctx.fill(); 1448 ctx.closePath(); 1449 }//end if dealing with closing a stacked series 1450 } 1451 1452 } //end plotLineArea 1327 1453 1328 1454 ctx.save(); … … 1348 1474 setFillStyle(series.lines, series.color); 1349 1475 if (series.lines.fill) 1350 plotLineArea(series.data, series.xaxis, series.yaxis, series.dataManip );1476 plotLineArea(series.data, series.xaxis, series.yaxis, series.dataManip, b_series); 1351 1477 plotLine(series.data, 0, series.xaxis, series.yaxis, series.dataManip); 1352 1478 ctx.restore(); … … 1629 1755 // Returns the data item the mouse is over, or null if none is found 1630 1756 function findNearbyItem(mouseX, mouseY) { 1757 1631 1758 var items = [] 1632 1759 var maxDistance = options.grid.mouseActiveRadius, … … 1655 1782 barLeft = series[i].bars.align == "left" ? 0 : -series[i].bars.barWidth/2, 1656 1783 barRight = barLeft + series[i].bars.barWidth, 1657 bj = binary_search(data, mx, data.length , 0),1784 bj = binary_search(data, mx, data.length-1, 0), 1658 1785 j_start, j_end; 1659 1786 if(options.grid.hoverXOnly) { ui/web/htdocs/js/recon.js
r42fc0f6 ra3e35d2 311 311 refresh: 312 312 function(options) { 313 313 314 if(this.length > 1) { 314 315 this.each(function(i) { $(this).ReconGraphRefresh(options); }); … … 328 329 $.ajaxq (this.graphinfo.graphid, { url: url, 329 330 data: data, 330 success: (function(o) { return function (r) { r = eval('('+r+')'); o.ReconGraphPlot(r, function() { o.ReconGraphRefresh(); }) }}) (this)331 success: (function(o) { return function (r) { r = eval('('+r+')'); o.ReconGraphPlot(r, function() { o.ReconGraphRefresh(); }) }}) (this) 331 332 }); 332 333 … … 370 371 r.options.y2axis.tickFormatter = ytickformatter(ddata, 2); 371 372 r.options.xaxis.localtime = true; 373 374 r.options.stackSets = this.graphinfo.stacks; 375 372 376 doptions = r.options; 373 377 … … 785 789 786 790 function zoom_modal (id, gtype) { 787 stream_graph = $('<div></div>').ReconGraph({graphid: id, type: gtype}); 791 792 if(id) $.getJSON("json/graph/info/" + id, function (ginfo) { 793 794 stream_graph = $('<div></div>').ReconGraph({graphid: ginfo.id, type: ginfo.type}); 788 795 var smod = stream_graph.modal({ 789 796 containerId: 'StreamingModalContainer', … … 801 808 }, 802 809 }); 803 stream_graph.ReconGraphRefresh({graphid: id});810 stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks}); 804 811 805 812 … … 836 843 $(".zoomStream").html('Streaming!').fadeIn('slow'); 837 844 $(".stream-log").removeAttr("style").html("stream log_"); 838 stream_data( id);845 stream_data(ginfo.id); 839 846 } 840 847 else if(streaming) { … … 843 850 $(".zoomStream").html('Stream Data').fadeIn('slow'); 844 851 $(".stream-log").attr("style", "display:none;"); 845 stream_graph.ReconGraphRefresh({graphid: id});852 stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks}); 846 853 } 847 854 }); //end stream click function … … 850 857 $(".datechoice").removeClass("selected"); 851 858 $(this).addClass("selected"); 852 stream_graph.ReconGraphRefresh({graphid: id, start: time_window_to_seconds($(this).html()), end: ''});859 stream_graph.ReconGraphRefresh({graphid: ginfo.id, stacks: ginfo.stacks, start: time_window_to_seconds($(this).html()), end: ''}); 853 860 return false; 854 861 }); 855 } 862 }); 863 } //end zoom_modal 864 856 865 857 866 function lock_wforms() { … … 936 945 g.type = j.type; 937 946 g.graphid = j.id; 947 g.stacks = j.stacks; 938 948 var o = make_ws_graph(g); 939 949 ul.append($('<li/>').append(o)); … … 963 973 g.type = j.type; 964 974 g.graphid = j.id; 975 g.stacks = j.stacks; 965 976 var o = make_ws_graph(g); 966 977 var ul = $("ul#worksheet-graphs"); ui/web/lib/Reconnoiter_flot_Driver.php
rfab20f2 ra3e35d2 63 63 //each dataset needs to have each point set for this stacking to work 64 64 //non numeric metric are given the value 0 above, so that if stacked, they show up on the plot-line itself 65 if($this->type == "stacked") {65 /* if($this->type == "stacked") { 66 66 $left_count = 0; $bottom = -1; $index=0; 67 67 foreach($this->sets as $name => $set) { … … 81 81 } 82 82 }//end if stacking 83 83 */ 84 84 $start_ts = $a[0]['data'][0][0]; 85 85 $finish = end($a[0]['data']);
