From b16626c3b5974aaed997fd28ce7708844bf785bc Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Thu, 12 Apr 2018 16:31:47 +0300 Subject: [PATCH] graph histogram: fix invisible highest value bucket --- public/app/plugins/panel/graph/graph.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/graph/graph.ts b/public/app/plugins/panel/graph/graph.ts index 07ce0fed49f..2de53b6dce0 100755 --- a/public/app/plugins/panel/graph/graph.ts +++ b/public/app/plugins/panel/graph/graph.ts @@ -443,7 +443,8 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) { // Expand ticks for pretty view min = Math.floor(min / tickStep) * tickStep; - max = Math.ceil(max / tickStep) * tickStep; + // 1.01 is 101% - ensure we have enough space for last bar + max = Math.ceil(max * 1.01 / tickStep) * tickStep; ticks = []; for (let i = min; i <= max; i += tickStep) {