From 2085397f31a672be01aa234416bf1366202b4a9b Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Mon, 11 Mar 2019 15:54:40 +0300 Subject: [PATCH] heatmap: fix middle bucket bound for prometheus --- public/app/plugins/panel/heatmap/heatmap_ctrl.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/plugins/panel/heatmap/heatmap_ctrl.ts b/public/app/plugins/panel/heatmap/heatmap_ctrl.ts index 0f44dbd477b..33d4511f18e 100644 --- a/public/app/plugins/panel/heatmap/heatmap_ctrl.ts +++ b/public/app/plugins/panel/heatmap/heatmap_ctrl.ts @@ -231,7 +231,10 @@ export class HeatmapCtrl extends MetricsPanelCtrl { tsBuckets = _.map(this.series, 'label'); const yBucketBound = this.panel.yBucketBound; - if ((panelDatasource === 'prometheus' && yBucketBound !== 'lower') || yBucketBound === 'upper') { + if ( + (panelDatasource === 'prometheus' && yBucketBound !== 'lower' && yBucketBound !== 'middle') || + yBucketBound === 'upper' + ) { // Prometheus labels are upper inclusive bounds, so add empty bottom bucket label. tsBuckets = [''].concat(tsBuckets); } else {