diff --git a/public/app/plugins/panel/heatmap/heatmap_ctrl.ts b/public/app/plugins/panel/heatmap/heatmap_ctrl.ts
index 33d4511f18e..329acbd7ee4 100644
--- a/public/app/plugins/panel/heatmap/heatmap_ctrl.ts
+++ b/public/app/plugins/panel/heatmap/heatmap_ctrl.ts
@@ -34,6 +34,7 @@ const panelDefaults = {
},
dataFormat: 'timeseries',
yBucketBound: 'auto',
+ reverseYBuckets: false,
xAxis: {
show: true,
},
@@ -108,7 +109,7 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
selectionActivated: boolean;
unitFormats: any;
data: any;
- series: any;
+ series: any[];
timeSrv: any;
dataWarning: any;
decimals: number;
@@ -225,8 +226,12 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
this.series.sort(sortSeriesByLabel);
}
+ if (this.panel.reverseYBuckets) {
+ this.series.reverse();
+ }
+
// Convert histogram to heatmap. Each histogram bucket represented by the series which name is
- // a top (or bottom, depends of datasource) bucket bound. Further, these values will be used as X axis labels.
+ // a top (or bottom, depends of datasource) bucket bound. Further, these values will be used as Y axis labels.
bucketsData = histogramToHeatmap(this.series);
tsBuckets = _.map(this.series, 'label');
diff --git a/public/app/plugins/panel/heatmap/partials/axes_editor.html b/public/app/plugins/panel/heatmap/partials/axes_editor.html
index 0b12ac52e24..0327ee87251 100644
--- a/public/app/plugins/panel/heatmap/partials/axes_editor.html
+++ b/public/app/plugins/panel/heatmap/partials/axes_editor.html
@@ -40,6 +40,11 @@
+