You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2016/09/24 08:13:28 UTC

svn commit: r1762108 - /jmeter/trunk/bin/report-template/content/js/jquery.flot.stack.js

Author: pmouawad
Date: Sat Sep 24 08:13:28 2016
New Revision: 1762108

URL: http://svn.apache.org/viewvc?rev=1762108&view=rev
Log:
Bug 60171 - Report / Dashboard : Active Threads Over Time should stack lines to give the total amount of threads running
Tab space police !!!!!!

Bugzilla Id: 60171

Modified:
    jmeter/trunk/bin/report-template/content/js/jquery.flot.stack.js   (contents, props changed)

Modified: jmeter/trunk/bin/report-template/content/js/jquery.flot.stack.js
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/report-template/content/js/jquery.flot.stack.js?rev=1762108&r1=1762107&r2=1762108&view=diff
==============================================================================
--- jmeter/trunk/bin/report-template/content/js/jquery.flot.stack.js (original)
+++ jmeter/trunk/bin/report-template/content/js/jquery.flot.stack.js Sat Sep 24 08:13:28 2016
@@ -14,16 +14,16 @@ Two or more series are stacked when thei
 key (which can be any number or string or just "true"). To specify the default
 stack, you can set the stack option like this:
 
-	series: {
-		stack: null/false, true, or a key (number/string)
-	}
+    series: {
+        stack: null/false, true, or a key (number/string)
+    }
 
 You can also specify it for a single series, like this:
 
-	$.plot( $("#placeholder"), [{
-		data: [ ... ],
-		stack: true
-	}])
+    $.plot( $("#placeholder"), [{
+        data: [ ... ],
+        stack: true
+    }])
 
 The stacking order is determined by the order of the data series in the array
 (later series end up on top of the previous).
@@ -39,45 +39,45 @@ charts or filled areas).
  * Patched version as per https://github.com/flot/flot/issues/326
  */
 (function ($) {
-	var options = {
-		series: { stack: null } // or number/string
-	};
-
-	function init(plot) {
-
-    	// will be built up dynamically as a hash from x-value to
-	    var stackBases = {};
-
-    	function stackData(plot, s, datapoints) {
-        	if (s.stack == null || s.stack === false)
-            	return;
-
-	        var newPoints = [];
-	
-    	    for (var i=0; i <  datapoints.points.length; i += 3) {
-
-        	    if (!stackBases[datapoints.points[i]]) {
-            	    stackBases[datapoints.points[i]] = 0;
-	            }
-
-    	        // note that the values need to be turned into absolute y-values.
-        	    // in other words, if you were to stack (x, y1), (x, y2), and (x, y3), (each from different series, which is where stackBases comes in),
-				// you'd want the new points to be (x, y1, 0), (x, y1+y2, y1), (x,y1+y2+y3, y1+y2)
-				// generally, (x, thisValue + (base up to this point), + (base up tothis point))
-        	    newPoints[i] = datapoints.points[i];
-        	    newPoints[i+1] = datapoints.points[i+1] + stackBases[datapoints.points[i]];
-				newPoints[i+2] = stackBases[datapoints.points[i]];
-        	    stackBases[datapoints.points[i]] += datapoints.points[i+1];
-        	}
-        	datapoints.points = newPoints;
-    	}
-    	plot.hooks.processDatapoints.push(stackData);
-	}
-
-	$.plot.plugins.push({
-	    init: init,
-    	options: options,
-	    name: 'stack',
-    	version: '1.2-patch-326'
-	});
-})(jQuery);
\ No newline at end of file
+    var options = {
+        series: { stack: null } // or number/string
+    };
+
+    function init(plot) {
+
+        // will be built up dynamically as a hash from x-value to
+        var stackBases = {};
+
+        function stackData(plot, s, datapoints) {
+            if (s.stack == null || s.stack === false)
+                return;
+
+            var newPoints = [];
+    
+            for (var i=0; i <  datapoints.points.length; i += 3) {
+
+                if (!stackBases[datapoints.points[i]]) {
+                    stackBases[datapoints.points[i]] = 0;
+                }
+
+                // note that the values need to be turned into absolute y-values.
+                // in other words, if you were to stack (x, y1), (x, y2), and (x, y3), (each from different series, which is where stackBases comes in),
+                // you'd want the new points to be (x, y1, 0), (x, y1+y2, y1), (x,y1+y2+y3, y1+y2)
+                // generally, (x, thisValue + (base up to this point), + (base up tothis point))
+                newPoints[i] = datapoints.points[i];
+                newPoints[i+1] = datapoints.points[i+1] + stackBases[datapoints.points[i]];
+                newPoints[i+2] = stackBases[datapoints.points[i]];
+                stackBases[datapoints.points[i]] += datapoints.points[i+1];
+            }
+            datapoints.points = newPoints;
+        }
+        plot.hooks.processDatapoints.push(stackData);
+    }
+
+    $.plot.plugins.push({
+        init: init,
+        options: options,
+        name: 'stack',
+        version: '1.2-patch-326'
+    });
+})(jQuery);

Propchange: jmeter/trunk/bin/report-template/content/js/jquery.flot.stack.js
------------------------------------------------------------------------------
    svn:eol-style = native