Commit 26ddb997 by Alexander Zobnin

heatmap: fix Y bucket size calculation for 'tsbuckets' mode

parent 2a2675c1
...@@ -146,13 +146,9 @@ export class HeatmapCtrl extends MetricsPanelCtrl { ...@@ -146,13 +146,9 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
// Calculate bucket size based on ES heatmap data // Calculate bucket size based on ES heatmap data
let xBucketBoundSet = _.map(_.keys(bucketsData), key => Number(key)); let xBucketBoundSet = _.map(_.keys(bucketsData), key => Number(key));
let yBucketBoundSet = _.map(this.series, series => Number(series.alias));
xBucketSize = calculateBucketSize(xBucketBoundSet); xBucketSize = calculateBucketSize(xBucketBoundSet);
yBucketSize = calculateBucketSize(yBucketBoundSet, logBase); // Always let yBucketSize=1 in 'tsbuckets' mode
if (logBase !== 1) { yBucketSize = 1;
// Use yBucketSize in meaning of "Split factor" for log scales
yBucketSize = 1 / yBucketSize;
}
} else { } else {
let xBucketNumber = this.panel.xBucketNumber || X_BUCKET_NUMBER_DEFAULT; let xBucketNumber = this.panel.xBucketNumber || X_BUCKET_NUMBER_DEFAULT;
let xBucketSizeByNumber = Math.floor((this.range.to - this.range.from) / xBucketNumber); let xBucketSizeByNumber = Math.floor((this.range.to - this.range.from) / xBucketNumber);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment