Restrict color scaling to min-max values in spectrum mode (#134)

* Restrict min-max values in spectrum mode
This commit is contained in:
Yamac K
2020-10-10 13:11:11 +03:00
committed by GitHub
parent 012bcac0ef
commit ce18758cd1
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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);