Commit ece9eb54 by Alexander Zobnin

Merge branch 'master' of https://github.com/thattolleyguy/grafana into thattolleyguy-master

parents 8c027ea7 ca3c1d8c
......@@ -153,7 +153,15 @@ export class HeatmapTooltip {
getXBucketIndex(offsetX, data) {
let x = this.scope.xScale.invert(offsetX - this.scope.yAxisWidth).valueOf();
let xBucketIndex = getValueBucketBound(x, data.xBucketSize, 1);
let xBucket = _.find(data.buckets, (bucket, bucketIndex) => {
return x-bucket.x <= data.xBucketSize && x-bucket.x >0;
});
let xBucketIndex;
if (!xBucket) {
xBucketIndex = getValueBucketBound(x, data.xBucketSize, 1);
} else {
xBucketIndex = xBucket.x;
}
return xBucketIndex;
}
......
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