diff --git a/src/color_legend.ts b/src/color_legend.ts index f15fa5f..257e51b 100644 --- a/src/color_legend.ts +++ b/src/color_legend.ts @@ -68,8 +68,8 @@ coreModule.directive('statusHeatmapLegend', function() { if (ctrl.bucketMatrix) { let rangeFrom = ctrl.bucketMatrix.minValue; let rangeTo = ctrl.bucketMatrix.maxValue; - let maxValue = panel.color.max || rangeTo; - let minValue = panel.color.min || rangeFrom; + let maxValue = panel.color.max != null ? panel.color.max : rangeTo; + let minValue = panel.color.min != null ? panel.color.min : rangeFrom; if (ctrl.bucketMatrix.noDatapoints) { if (!panel.color.max) { diff --git a/src/rendering.ts b/src/rendering.ts index 8c265a5..4ea96e3 100644 --- a/src/rendering.ts +++ b/src/rendering.ts @@ -364,8 +364,8 @@ export class StatusmapRenderer { } addStatusmap():void { - let maxValue = this.panel.color.max || this.bucketMatrix.maxValue; - let minValue = this.panel.color.min || this.bucketMatrix.minValue; + let maxValue = this.panel.color.max != null ? this.panel.color.max : this.bucketMatrix.maxValue; + let minValue = this.panel.color.min != null ? this.panel.color.min : this.bucketMatrix.minValue; if (this.panel.color.mode !== 'discrete') { this.colorScale = this.getColorScale(maxValue, minValue);