Commit 00236577 by Alexander Zobnin

Fix bucket size calculation if all values are 0;

parent 96e91b5a
...@@ -158,7 +158,11 @@ export class HeatmapCtrl extends MetricsPanelCtrl { ...@@ -158,7 +158,11 @@ export class HeatmapCtrl extends MetricsPanelCtrl {
yBucketSize = this.panel.yAxis.splitFactor; yBucketSize = this.panel.yAxis.splitFactor;
} else { } else {
if (heatmapStats.max === heatmapStats.min) { if (heatmapStats.max === heatmapStats.min) {
yBucketSize = heatmapStats.max / Y_BUCKET_NUMBER_DEFAULT; if (heatmapStats.max) {
yBucketSize = heatmapStats.max / Y_BUCKET_NUMBER_DEFAULT;
} else {
yBucketSize = 1;
}
} else { } else {
yBucketSize = (heatmapStats.max - heatmapStats.min) / yBucketNumber; yBucketSize = (heatmapStats.max - heatmapStats.min) / yBucketNumber;
} }
......
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