diff --git a/public/app/plugins/panel/heatmap/heatmap_ctrl.ts b/public/app/plugins/panel/heatmap/heatmap_ctrl.ts index c4ad9c422dc..1a41e4be8e9 100644 --- a/public/app/plugins/panel/heatmap/heatmap_ctrl.ts +++ b/public/app/plugins/panel/heatmap/heatmap_ctrl.ts @@ -158,7 +158,11 @@ export class HeatmapCtrl extends MetricsPanelCtrl { yBucketSize = this.panel.yAxis.splitFactor; } else { 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 { yBucketSize = (heatmapStats.max - heatmapStats.min) / yBucketNumber; }