Browse Source

added y2 text after right y axis series, when legend is in table display mode #136

Torkel Ödegaard 11 năm trước cách đây
mục cha
commit
88ab36c45b

+ 0 - 2
src/app/components/require.config.js

@@ -39,7 +39,6 @@ require.config({
     'jquery.flot.stack':      '../vendor/jquery/jquery.flot.stack',
     'jquery.flot.stack':      '../vendor/jquery/jquery.flot.stack',
     'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
     'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
     'jquery.flot.time':       '../vendor/jquery/jquery.flot.time',
     'jquery.flot.time':       '../vendor/jquery/jquery.flot.time',
-    'jquery.flot.byte':       '../vendor/jquery/jquery.flot.byte',
 
 
     modernizr:                '../vendor/modernizr-2.6.1',
     modernizr:                '../vendor/modernizr-2.6.1',
     elasticjs:                '../vendor/elasticjs/elastic-angular-client',
     elasticjs:                '../vendor/elasticjs/elastic-angular-client',
@@ -81,7 +80,6 @@ require.config({
     //
     //
     'jquery-ui':            ['jquery'],
     'jquery-ui':            ['jquery'],
     'jquery.flot':          ['jquery'],
     'jquery.flot':          ['jquery'],
-    'jquery.flot.byte':     ['jquery', 'jquery.flot'],
     'jquery.flot.pie':      ['jquery', 'jquery.flot'],
     'jquery.flot.pie':      ['jquery', 'jquery.flot'],
     'jquery.flot.events':   ['jquery', 'jquery.flot'],
     'jquery.flot.events':   ['jquery', 'jquery.flot'],
     'jquery.flot.selection':['jquery', 'jquery.flot'],
     'jquery.flot.selection':['jquery', 'jquery.flot'],

+ 0 - 1
src/app/panels/graph/module.js

@@ -25,7 +25,6 @@ define([
   'jquery.flot.events',
   'jquery.flot.events',
   'jquery.flot.selection',
   'jquery.flot.selection',
   'jquery.flot.time',
   'jquery.flot.time',
-  'jquery.flot.byte',
   'jquery.flot.stack',
   'jquery.flot.stack',
   'jquery.flot.stackpercent'
   'jquery.flot.stackpercent'
 ],
 ],

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/css/bootstrap.dark.min.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/css/bootstrap.light.min.css


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
src/css/default.min.css


+ 3 - 0
src/css/less/legend.less

@@ -37,6 +37,9 @@
     padding-left: 0;
     padding-left: 0;
     &.pull-right {
     &.pull-right {
       float: none;
       float: none;
+      .graph-legend-alias::after {
+        content: 'y\00B2';
+      }
     }
     }
   }
   }
 
 

+ 0 - 3
src/test/test-main.js

@@ -42,7 +42,6 @@ require.config({
     'jquery.flot.stack':      '../vendor/jquery/jquery.flot.stack',
     'jquery.flot.stack':      '../vendor/jquery/jquery.flot.stack',
     'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
     'jquery.flot.stackpercent':'../vendor/jquery/jquery.flot.stackpercent',
     'jquery.flot.time':       '../vendor/jquery/jquery.flot.time',
     'jquery.flot.time':       '../vendor/jquery/jquery.flot.time',
-    'jquery.flot.byte':       '../vendor/jquery/jquery.flot.byte',
 
 
     modernizr:                '../vendor/modernizr-2.6.1',
     modernizr:                '../vendor/modernizr-2.6.1',
     elasticjs:                '../vendor/elasticjs/elastic-angular-client',
     elasticjs:                '../vendor/elasticjs/elastic-angular-client',
@@ -76,7 +75,6 @@ require.config({
 
 
     'jquery-ui':            ['jquery'],
     'jquery-ui':            ['jquery'],
     'jquery.flot':          ['jquery'],
     'jquery.flot':          ['jquery'],
-    'jquery.flot.byte':     ['jquery', 'jquery.flot'],
     'jquery.flot.pie':      ['jquery', 'jquery.flot'],
     'jquery.flot.pie':      ['jquery', 'jquery.flot'],
     'jquery.flot.events':   ['jquery', 'jquery.flot'],
     'jquery.flot.events':   ['jquery', 'jquery.flot'],
     'jquery.flot.selection':['jquery', 'jquery.flot'],
     'jquery.flot.selection':['jquery', 'jquery.flot'],
@@ -97,7 +95,6 @@ require.config({
 
 
     'bootstrap-tagsinput':          ['jquery'],
     'bootstrap-tagsinput':          ['jquery'],
 
 
-
     timepicker:             ['jquery', 'bootstrap'],
     timepicker:             ['jquery', 'bootstrap'],
     datepicker:             ['jquery', 'bootstrap'],
     datepicker:             ['jquery', 'bootstrap'],
 
 

+ 0 - 107
src/vendor/jquery/jquery.flot.byte.js

@@ -1,107 +0,0 @@
-(function ($) {
-  "use strict";
-
-  var options = {};
-
-  //Round to nearby lower multiple of base
-  function floorInBase(n, base) {
-    return base * Math.floor(n / base);
-  }
-
-  function init(plot) {
-    plot.hooks.processDatapoints.push(function (plot) {
-      $.each(plot.getAxes(), function(axisName, axis) {
-        var opts = axis.options;
-        if (opts.mode === "byte" || opts.mode === "byteRate") {
-          axis.tickGenerator = function (axis) {
-            var returnTicks = [],
-              tickSize = 2,
-              delta = axis.delta,
-              steps = 0,
-              tickMin = 0,
-              tickVal,
-              tickCount = 0;
-
-            //Set the reference for the formatter
-            if (opts.mode === "byteRate") {
-              axis.rate = true;
-            }
-
-            //Enforce maximum tick Decimals
-            if (typeof opts.tickDecimals === "number") {
-              axis.tickDecimals = opts.tickDecimals;
-            } else {
-              axis.tickDecimals = 2;
-            }
-
-            //Count the steps
-            while (Math.abs(delta) >= 1024) {
-              steps++;
-              delta /= 1024;
-            }
-
-            //Set the tick size relative to the remaining delta
-            while (tickSize <= 1024) {
-              if (delta <= tickSize) {
-                break;
-              }
-              tickSize *= 2;
-            }
-
-            //Tell flot the tickSize we've calculated
-            if (typeof opts.minTickSize !== "undefined" && tickSize < opts.minTickSize) {
-              axis.tickSize = opts.minTickSize;
-            } else {
-              axis.tickSize = tickSize * Math.pow(1024,steps);
-            }
-
-            //Calculate the new ticks
-            tickMin = floorInBase(axis.min, axis.tickSize);
-            do {
-              tickVal = tickMin + (tickCount++) * axis.tickSize;
-              returnTicks.push(tickVal);
-            } while (tickVal < axis.max);
-
-            return returnTicks;
-          };
-
-          axis.tickFormatter = function(size, axis) {
-            var ext, steps = 0;
-
-            while (Math.abs(size) >= 1024) {
-              steps++;
-              size /= 1024;
-            }
-
-
-            switch (steps) {
-              case 0: ext = " B";  break;
-              case 1: ext = " KB"; break;
-              case 2: ext = " MB"; break;
-              case 3: ext = " GB"; break;
-              case 4: ext = " TB"; break;
-              case 5: ext = " PB"; break;
-              case 6: ext = " EB"; break;
-              case 7: ext = " ZB"; break;
-              case 8: ext = " YB"; break;
-            }
-
-
-            if (typeof axis.rate !== "undefined") {
-              ext += "/s";
-            }
-
-            return (size.toFixed(axis.tickDecimals) + ext);
-          };
-        }
-      });
-    });
-  }
-
-  $.plot.plugins.push({
-    init: init,
-    options: options,
-    name: "byte",
-    version: "0.1"
-  });
-})(jQuery);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 2
src/vendor/jquery/jquery.flot.js


+ 20 - 20
src/vendor/jquery/jquery.flot.stack.js

@@ -1,6 +1,6 @@
 /* Flot plugin for stacking data sets rather than overlyaing them.
 /* Flot plugin for stacking data sets rather than overlyaing them.
 
 
-Copyright (c) 2007-2013 IOLA and Ole Laursen.
+Copyright (c) 2007-2014 IOLA and Ole Laursen.
 Licensed under the MIT license.
 Licensed under the MIT license.
 
 
 The plugin assumes the data is sorted on x (or y if stacking horizontally).
 The plugin assumes the data is sorted on x (or y if stacking horizontally).
@@ -14,16 +14,16 @@ Two or more series are stacked when their "stack" attribute is set to the same
 key (which can be any number or string or just "true"). To specify the default
 key (which can be any number or string or just "true"). To specify the default
 stack, you can set the stack option like this:
 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:
 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
 The stacking order is determined by the order of the data series in the array
 (later series end up on top of the previous).
 (later series end up on top of the previous).
@@ -39,21 +39,21 @@ charts or filled areas).
     var options = {
     var options = {
         series: { stack: null } // or number/string
         series: { stack: null } // or number/string
     };
     };
-    
+
     function init(plot) {
     function init(plot) {
         function findMatchingSeries(s, allseries) {
         function findMatchingSeries(s, allseries) {
             var res = null;
             var res = null;
             for (var i = 0; i < allseries.length; ++i) {
             for (var i = 0; i < allseries.length; ++i) {
                 if (s == allseries[i])
                 if (s == allseries[i])
                     break;
                     break;
-                
+
                 if (allseries[i].stack == s.stack)
                 if (allseries[i].stack == s.stack)
                     res = allseries[i];
                     res = allseries[i];
             }
             }
-            
+
             return res;
             return res;
         }
         }
-        
+
         function stackData(plot, s, datapoints) {
         function stackData(plot, s, datapoints) {
             if (s.stack == null || s.stack === false)
             if (s.stack == null || s.stack === false)
                 return;
                 return;
@@ -118,7 +118,7 @@ charts or filled areas).
 
 
                         newpoints[l + accumulateOffset] += qy;
                         newpoints[l + accumulateOffset] += qy;
                         bottom = qy;
                         bottom = qy;
-                        
+
                         i += ps;
                         i += ps;
                         j += otherps;
                         j += otherps;
                     }
                     }
@@ -131,7 +131,7 @@ charts or filled areas).
                             newpoints.push(intery + qy);
                             newpoints.push(intery + qy);
                             for (m = 2; m < ps; ++m)
                             for (m = 2; m < ps; ++m)
                                 newpoints.push(points[i + m]);
                                 newpoints.push(points[i + m]);
-                            bottom = qy; 
+                            bottom = qy;
                         }
                         }
 
 
                         j += otherps;
                         j += otherps;
@@ -142,22 +142,22 @@ charts or filled areas).
                             i += ps;
                             i += ps;
                             continue;
                             continue;
                         }
                         }
-                            
+
                         for (m = 0; m < ps; ++m)
                         for (m = 0; m < ps; ++m)
                             newpoints.push(points[i + m]);
                             newpoints.push(points[i + m]);
-                        
+
                         // we might be able to interpolate a point below,
                         // we might be able to interpolate a point below,
                         // this can give us a better y
                         // this can give us a better y
                         if (withlines && j > 0 && otherpoints[j - otherps] != null)
                         if (withlines && j > 0 && otherpoints[j - otherps] != null)
                             bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);
                             bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);
 
 
                         newpoints[l + accumulateOffset] += bottom;
                         newpoints[l + accumulateOffset] += bottom;
-                        
+
                         i += ps;
                         i += ps;
                     }
                     }
 
 
                     fromgap = false;
                     fromgap = false;
-                    
+
                     if (l != newpoints.length && withbottom)
                     if (l != newpoints.length && withbottom)
                         newpoints[l + 2] += bottom;
                         newpoints[l + 2] += bottom;
                 }
                 }
@@ -175,10 +175,10 @@ charts or filled areas).
 
 
             datapoints.points = newpoints;
             datapoints.points = newpoints;
         }
         }
-        
+
         plot.hooks.processDatapoints.push(stackData);
         plot.hooks.processDatapoints.push(stackData);
     }
     }
-    
+
     $.plot.plugins.push({
     $.plot.plugins.push({
         init: init,
         init: init,
         options: options,
         options: options,

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác