From 32f9a42d5e931be549ff9f169468b404af9a6b21 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Tue, 18 Jul 2017 03:50:58 +0900 Subject: [PATCH] Fix performance degradation by always setting fill = 0.001 (#8868) * add benchmark * fix, prevent plotLineArea() call if fill == 0 * remove benchmark --- public/app/plugins/panel/graph/graph.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index ac75aa28754..21358a7e8cc 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/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) {