mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
heatmap: fix tooltip histogram for 'tsbuckets' mode
This commit is contained in:
parent
97c54e6956
commit
bc47380032
@ -177,7 +177,16 @@ export class HeatmapTooltip {
|
||||
addHistogram(data) {
|
||||
let xBucket = this.scope.ctrl.data.buckets[data.x];
|
||||
let yBucketSize = this.scope.ctrl.data.yBucketSize;
|
||||
let { min, max, ticks } = this.scope.ctrl.data.yAxis;
|
||||
let min, max, ticks;
|
||||
if (this.scope.ctrl.data.tsBuckets) {
|
||||
min = 0;
|
||||
max = this.scope.ctrl.data.tsBuckets.length - 1;
|
||||
ticks = this.scope.ctrl.data.tsBuckets.length;
|
||||
} else {
|
||||
min = this.scope.ctrl.data.yAxis.min;
|
||||
max = this.scope.ctrl.data.yAxis.max;
|
||||
ticks = this.scope.ctrl.data.yAxis.ticks;
|
||||
}
|
||||
let histogramData = _.map(xBucket.buckets, bucket => {
|
||||
let count = bucket.count !== undefined ? bucket.count : bucket.values.length;
|
||||
return [bucket.bounds.bottom, count];
|
||||
|
Loading…
Reference in New Issue
Block a user