|
@@ -34,6 +34,7 @@ const panelDefaults = {
|
|
|
},
|
|
},
|
|
|
dataFormat: 'timeseries',
|
|
dataFormat: 'timeseries',
|
|
|
yBucketBound: 'auto',
|
|
yBucketBound: 'auto',
|
|
|
|
|
+ reverseYBuckets: false,
|
|
|
xAxis: {
|
|
xAxis: {
|
|
|
show: true,
|
|
show: true,
|
|
|
},
|
|
},
|
|
@@ -108,7 +109,7 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
|
|
|
selectionActivated: boolean;
|
|
selectionActivated: boolean;
|
|
|
unitFormats: any;
|
|
unitFormats: any;
|
|
|
data: any;
|
|
data: any;
|
|
|
- series: any;
|
|
|
|
|
|
|
+ series: any[];
|
|
|
timeSrv: any;
|
|
timeSrv: any;
|
|
|
dataWarning: any;
|
|
dataWarning: any;
|
|
|
decimals: number;
|
|
decimals: number;
|
|
@@ -225,8 +226,12 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
|
|
|
this.series.sort(sortSeriesByLabel);
|
|
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
|
|
// 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);
|
|
bucketsData = histogramToHeatmap(this.series);
|
|
|
|
|
|
|
|
tsBuckets = _.map(this.series, 'label');
|
|
tsBuckets = _.map(this.series, 'label');
|