Commit 5d63ad21 by Brandon Arp Committed by Torkel Ödegaard

allow heatmap parsing of scaled datapoints (#8632)

parent e9c8881d
...@@ -207,15 +207,20 @@ function pushToXBuckets(buckets, point, bucketNum, seriesName) { ...@@ -207,15 +207,20 @@ function pushToXBuckets(buckets, point, bucketNum, seriesName) {
} }
function pushToYBuckets(buckets, bucketNum, value, point, bounds) { function pushToYBuckets(buckets, bucketNum, value, point, bounds) {
var count = 1;
// Use the 3rd argument as scale/count
if (point.length > 2) {
count = parseInt(point[2]);
}
if (buckets[bucketNum]) { if (buckets[bucketNum]) {
buckets[bucketNum].values.push(value); buckets[bucketNum].values.push(value);
buckets[bucketNum].count += 1; buckets[bucketNum].count += count;
} else { } else {
buckets[bucketNum] = { buckets[bucketNum] = {
y: bucketNum, y: bucketNum,
bounds: bounds, bounds: bounds,
values: [value], values: [value],
count: 1, count: count,
}; };
} }
} }
......
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