Browse Source

Fix performance degradation by always setting fill = 0.001 (#8868)

* add benchmark

* fix, prevent plotLineArea() call if fill == 0

* remove benchmark
Mitsuhiro Tanda 8 years ago
parent
commit
32f9a42d5e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      public/app/plugins/panel/graph/graph.ts

+ 5 - 1
public/app/plugins/panel/graph/graph.ts

@@ -375,7 +375,11 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv, popoverSrv) {
       }
 
       function translateFillOption(fill) {
-        return fill === 0 ? 0.001 : fill/10;
+        if (panel.percentage && panel.stack) {
+          return fill === 0 ? 0.001 : fill/10;
+        } else {
+          return fill/10;
+        }
       }
 
       function shouldDelayDraw(panel) {